Created
August 8, 2022 20:56
-
-
Save ernestognw/cbaafa6ffde27cf2c2bad252b1591eb3 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 { AdminClient } = require("defender-admin-client"); | |
const adminClient = new AdminClient({ | |
apiKey: <<API_KEY>>, | |
apiSecret: <<API_SECRET>>, | |
}); | |
const proposeGrantRole = async () => { | |
const yourAccont = '<<YOUR EOA>>' | |
const result = await adminClient.proposeGrantRole( | |
{ | |
title: "Test grant role", | |
description: "Test grant role", | |
via: yourAccount, | |
viaType: "EOA", | |
}, | |
{ | |
network: "rinkeby", | |
address: "<<YOUR EOA USED TO CREATE THE TIMELOCK>>", | |
}, | |
"0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1", // PROPOSER ROLE | |
yourAccount | |
); | |
console.log(result); | |
}; | |
proposeGrantRole() | |
.then(() => console.log("success")) | |
.catch(console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment