Skip to content

Instantly share code, notes, and snippets.

@ajb413
Created July 8, 2020 00:06
Show Gist options
  • Save ajb413/3a6f48ff05b9806517b83f8d6b2517f1 to your computer and use it in GitHub Desktop.
Save ajb413/3a6f48ff05b9806517b83f8d6b2517f1 to your computer and use it in GitHub Desktop.
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