Skip to content

Commit

Permalink
admin playbook/script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
preston4896 committed Dec 24, 2024
1 parent 9674409 commit 982b132
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions fundingvault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ npx hardhat set-manager-limits --network <network-name> --amount <ETH> --interva
npx hardhat rescue-call --network <network-name> --addr <address> --amount <wei> --data <calldata-hexstring>
```

Omit the `--data` argument to perform emergency fund withdrawals.

---

## Grant Manager Operations
Expand Down
10 changes: 6 additions & 4 deletions fundingvault/scripts/tasks/owner.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ task('set-proxy-manager', "Set account that is allowed to upgrade the contract")

task('rescue-call', "Performs an emergency rescue call from the Vault")
.addParam("addr", "The address to call")
.addParam("amount", "Amount in wei to send to address")
.addParam("data", "The calldata to forward from the Vault")
.addOptionalParam("amount", "Amount in wei to send to address")
.addOptionalParam("data", "The calldata to forward from the Vault")
.setAction(async (args) => {
const ownerWallet = getOwnerWallet();
const vaultContract = getVaultInstance();
const amount = args.amount ? args.amount : 0;
const data = args.data ? args.data : "0x";
const tx = await vaultContract.connect(ownerWallet).rescueCall(
args.addr,
args.amount,
args.data
amount,
data
);

console.log(`Tx: ${tx.hash}`);
Expand Down
8 changes: 7 additions & 1 deletion playbook/ADMIN_PLAYBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,10 @@ Using the same example as above, but now we set a cooldown lock of 43200 seconds

- Alice can no longer create/update/transfer grants for 12 hours.

- 12 hours later, even though Alice still has to "cooldown" for 12 more hours, she may now perform any actions that are allowable. However, the locking time now gets applied linearly following the rules above.
- 12 hours later, even though Alice still has to "cooldown" for 12 more hours, she may now perform any actions that are allowable. However, the locking time now gets applied linearly following the rules above.

## Step 5: Emergency Rescue Calls

In the event of emergency, vault owners may perform arbitrary emergency calls from the Vault contract by invoking the `rescueCall()` method.

This method can also be used to perform fund withdrawals from the Vault contract.

0 comments on commit 982b132

Please sign in to comment.