UMIP-XX | |
---|---|
UMIP Title | Add BASKUSD and BDIDPI_MCAP_DIFF as supported price identifiers |
Authors | Adrian Li |
Status | Draft |
Created | 2021-05-15 |
Discourse Link | INSERT DISCOURSE LINK HERE |
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
Hey, I'm adrianmcli-943555 and I have contributed to the RLN Trusted Setup Ceremony MPC Phase2 Trusted Setup ceremony. | |
The following are my contribution signatures: | |
Circuit # 1 (rln-withdraw) | |
Contributor # 8 | |
Contribution Hash: ebbe0047 4d2bdce5 30dc5990 c271462f | |
aba6770d c33abf4c 17698c9e 1d35d8de | |
91a73ef3 324f0899 1b741bc0 8ce05488 | |
5a6287e7 953f958f d2510682 8d974c2b |
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 path = require("path"); | |
const fs = require("fs"); | |
// get JSON artifact files | |
const artifactDir = path.join(__dirname, "build/contracts/"); | |
const files = fs.readdirSync(artifactDir); | |
const jsonFiles = files.filter(x => x.slice(-4) === "json"); | |
console.log(jsonFiles.length, "json files found"); |
The following commands were run to find the number of files related to Truffle products based on a case-insensitive search:
➜ ethereumbook git:(develop) ✗ git grep -i --files-with-matches 'truffle' | wc -l
51
➜ ethereumbook git:(develop) ✗ git grep -i --files-with-matches 'ganache' | wc -l
13
➜ ethereumbook git:(develop) ✗ git grep -i --files-with-matches 'drizzle' | wc -l
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
> keccak@1.4.0 install /Users/adrianli/dev/temp/node_modules/keccak | |
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used." | |
> keccak@1.4.0 rebuild /Users/adrianli/dev/temp/node_modules/keccak | |
> node-gyp rebuild | |
CXX(target) Release/obj.target/keccak/src/addon.o | |
../src/addon.cc:37:47: error: too few arguments to function call, single argument 'context' was not specified | |
unsigned int rate = info[0]->IntegerValue(); |
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
// state container definition | |
const useState = initVal => { | |
let val = initVal; | |
const get = () => val; | |
const set = x => (val = x); | |
return Object.freeze({ get, set }); | |
}; |
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 makeCounter = (initVal = 0) => { | |
let count = initVal; | |
const get = () => count; | |
const set = x => (count = x); | |
const inc = () => count++; | |
const dec = () => count--; | |
return Object.freeze({ | |
get, |
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 path = require("path"); | |
const fs = require("fs"); | |
const TruffleCompile = require("truffle-compile"); | |
// Promisify truffle-compile | |
const truffleCompile = (...args) => | |
new Promise(resolve => TruffleCompile(...args, (_, data) => resolve(data))); | |
const compile = async filename => { | |
const sourcePath = path.join(__dirname, "../contracts", filename); |
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 Web3 = require("web3") // import web3 v1.0 constructor | |
// use globally injected web3 to find the currentProvider and wrap with web3 v1.0 | |
const getWeb3 = () => { | |
const myWeb3 = new Web3(web3.currentProvider) | |
return myWeb3 | |
} | |
// assumes passed-in web3 is v1.0 and creates a function to receive contract name | |
const getContractInstance = (web3) => (contractName) => { |
NewerOlder