Created
July 8, 2020 00:06
-
-
Save ajb413/3a6f48ff05b9806517b83f8d6b2517f1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 myWalletAddress = web3.eth.accounts.wallet[0].address; | |
var batch = new web3.BatchRequest(); | |
signatures.forEach((signature) => { | |
const { delegatee, nonce, expiry, v, r, s } = signature; | |
batch.add(comp.methods.delegateBySig(delegatee, nonce, expiry, v, r, s).send.request( | |
{ | |
from: myWalletAddress, | |
gasLimit: web3.utils.toHex(1000000), | |
gasPrice: web3.utils.toHex(25000000000), | |
}, | |
console.log | |
) | |
); | |
}); | |
await batch.execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment