Skip to content

Commit 94f13d5

Browse files
committed
add and update scripts
1 parent 4cf613b commit 94f13d5

8 files changed

Lines changed: 890 additions & 7 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ typechain/
5252
*/deployments/*forked*
5353
venv/
5454
!/external/artifacts/
55-
cache_hardhat/
55+
cache_hardhat/
56+
secrets/

deployment/helpers/helpers.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,27 @@ const multisigAddOwner = async (addAddress, sender) => {
124124
);
125125
};
126126

127+
const multisigReplaceOwner = async (oldAddress, newAddress, sender) => {
128+
const {
129+
ethers,
130+
getNamedAccounts,
131+
deployments: { get },
132+
} = hre;
133+
const multisigDeployment = await get("MultiSigWallet");
134+
let multisigInterface = new ethers.utils.Interface(multisigDeployment.abi);
135+
let data = multisigInterface.encodeFunctionData("replaceOwner", [oldAddress, newAddress]);
136+
///@todo check if the deployer is one of ms owners
137+
console.log(
138+
`Creating multisig tx to replace owner ${oldAddress} with the new owner ${newAddress}...`
139+
);
140+
await sendWithMultisig(multisigDeployment.address, multisigDeployment.address, data, sender);
141+
console.log(
142+
col.bgBlue(
143+
`>>> DONE. Requires Multisig (${multisigDeployment.address}) signing to execute tx <<<`
144+
)
145+
);
146+
};
147+
127148
const multisigRemoveOwner = async (removeAddress, sender) => {
128149
const {
129150
ethers,
@@ -839,4 +860,5 @@ module.exports = {
839860
logTimer,
840861
upgradeWithTransparentUpgradableProxy,
841862
getSignerFromAccount,
863+
multisigReplaceOwner,
842864
};

0 commit comments

Comments
 (0)