Created
August 8, 2022 21:02
-
-
Save ernestognw/a255c80cc7b66df85ee7cd1350fd1f04 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.proposeRevokeRole( | |
{ | |
title: "Test revoke role", | |
description: "Test revoke 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