-
-
Save NaoyaTabakomori/fe7e45609f657e79f85dce554c1c2301 to your computer and use it in GitHub Desktop.
_powersのmapping, _decorationsのmapping, その先にあるarrayの要素の位置を特定する
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'); | |
const provider = new Web3.providers.HttpProvider( | |
"https://ropsten.infura.io/ws" | |
); | |
const web3 = new Web3(provider); | |
getKeys() | |
function getKeys() { | |
let key = '0000000000000000000000[your_address_from_0x]' | |
let powerIndex = '0000000000000000000000000000000000000000000000000000000000000000' | |
let powerKey = web3.sha3(key + powerIndex, {"encoding":"hex"}) | |
console.log("powerKey: "+powerKey); | |
let decorationArrIndex = '0000000000000000000000000000000000000000000000000000000000000001' | |
let decorationArrKey = web3.sha3(key + decorationArrIndex, {"encoding":"hex"}) | |
console.log("arrKey: "+decorationArrKey); | |
let decorationArr0Key = web3.sha3(decorationArrKey, {"encoding":"hex"}) | |
console.log("decorationArr0Key: "+decorationArr0Key); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment