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
# Prepare a circuit to push to proof market | |
python3 scripts/prepare_statement.py -c=/root/workshop/data/arithmetics_example.ll -o=arithmetic_stmt.json -n=arithmetic -t=placeholder-zkllvm | |
# Push to proof market | |
python3 scripts/statement_tools.py push --file arithmetic_stmt.json | |
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
const Isolated = artifacts.require("Isolated"); | |
// const assert = require("chai").assert; | |
// const truffleAssert = require('truffle-assertions'); | |
contract('Isolated', (accounts) => { | |
it('Configuration is setup', async () => { | |
let contractInstance = await Isolated.deployed(); | |
await contractInstance.updateAdmin(accounts[0]); |
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
/* | |
Ref : https://medium.com/metamask/eip712-is-coming-what-to-expect-and-how-to-use-it-bb92fd1a7a26 | |
Signature was created using the API eth_signTypedData_v3 | |
Address recovered via eth-sig-utils | |
*/ | |
const sigUtil = require('eth-sig-util') | |
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
const MerkleTree = require('merkletreejs') | |
const crypto = require('crypto') | |
function sha256(data) { | |
// returns Buffer | |
return crypto.createHash('sha256').update(data).digest() | |
} | |
function buf2hex(buffer) { // buffer is an ArrayBuffer | |
return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join(''); |
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
diff --git a/cmd/livepeer_cli/livepeer_cli.go b/cmd/livepeer_cli/livepeer_cli.go | |
index 20059178..7d2f8fdd 100644 | |
--- a/cmd/livepeer_cli/livepeer_cli.go | |
+++ b/cmd/livepeer_cli/livepeer_cli.go | |
@@ -109,6 +109,7 @@ func (w *wizard) initializeOptions() []wizardOpt { | |
fmt.Print("For Rinkeby Eth, go to the Rinkeby faucet (https://faucet.rinkeby.io/).") | |
w.read() | |
}, testnet: true}, | |
+ {desc: "Register ENS subdomain", invoke: w.registerENSSubdomain}, | |
} |