This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"go.vocdoni.io/proto/build/go/models" | |
"google.golang.org/protobuf/proto" | |
"go.vocdoni.io/dvote/crypto/ethereum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package api | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/emprius/emprius-app-backend/db" | |
"github.com/go-chi/chi/v5" | |
"github.com/go-chi/chi/v5/middleware" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.8.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-05-29T10:10:01Z INFO service/storage.go:34 [ipfs info] peers:189 addresses:48302 pins:1309 | |
2020-05-29T10:10:03Z INFO ipfssync/ipfssync.go:280 [ipfsSync info] pins:1309 hash:0x6630e4ef5b8b8b2d07d28272a5c8b2005136a4b9de14c3fd9a4c7b6eac6a8b1c | |
2020-05-29T10:10:08Z INFO router/router.go:267 api method getBlockHeight | |
2020-05-29T10:10:09Z INFO router/router.go:267 api method getBlockHeight | |
2020-05-29T10:10:10Z INFO middleware/logger.go:150 "GET https://gw1.vocdoni.net:443/metrics HTTP/1.1" from 95.217.216.185 - 200 2085B in 2.603947ms | |
2020-05-29T10:10:15Z INFO service/vochain.go:122 [vochain info] height:149391 mempool:0 processTree:45 voteTree:1076 blockTime:{1m:12.0 10m:11.0 1h:12.0 6h:12.0 24h:12.0} | |
2020-05-29T10:10:16Z INFO chain/chain.go:246 [ethereum info] synced:true height:2780914/2780734 peers:49 mode:fast | |
2020-05-29T10:10:17Z INFO subpub/subpub.go:234 [subPub info] dhtPeers:135 dhtKnown:5726 clusterPeers:3 | |
2020-05-29T10:10:19Z INFO router/router.go:267 api method getBlockHeight | |
2020-05-29T10:10:19Z IN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am p4u on github. | |
* I am paues (https://keybase.io/paues) on keybase. | |
* I have a public key ASCSyKM6SCMuW76HahbJOD8f7lI90lCOsgm3fQhKjmPEPgo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
hexutil "github.com/ethereum/go-ethereum/common/hexutil" | |
crypto "github.com/ethereum/go-ethereum/crypto" | |
) | |
const SigningPrefix = "\u0019Ethereum Signed Message:\n" |