Skip to content

Instantly share code, notes, and snippets.

@ernestognw
Created August 8, 2022 21:02
Show Gist options
  • Save ernestognw/a255c80cc7b66df85ee7cd1350fd1f04 to your computer and use it in GitHub Desktop.
Save ernestognw/a255c80cc7b66df85ee7cd1350fd1f04 to your computer and use it in GitHub Desktop.
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