Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c560c9ef
Commit
c560c9ef
authored
Mar 28, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: cleanup withdrawal script
parent
696ca56e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
FeeVaultWithdrawal.s.sol
packages/contracts-bedrock/scripts/FeeVaultWithdrawal.s.sol
+11
-5
No files found.
packages/contracts-bedrock/scripts/FeeVaultWithdrawal.s.sol
View file @
c560c9ef
...
...
@@ -12,11 +12,11 @@ import { IMulticall3 } from "forge-std/interfaces/IMulticall3.sol";
* @notice A script to make it very simple to withdraw from the fee vaults.
* The usage is as follows:
* $ forge script scripts/FeeVaultWithdrawal.s.sol \
* --rpc-url $
OPTI_GOERLI
_RPC_URL --broadcast \
* --rpc-url $
ETH
_RPC_URL --broadcast \
* --private-key $PRIVATE_KEY
*/
contract FeeVaultWithdrawal is Script {
IMulticall3 private constant multicall = IMulticall3(
0xcA11bde05977b3631167028862bE2a173976CA11
);
IMulticall3 private constant multicall = IMulticall3(
MULTICALL3_ADDRESS
);
IMulticall3.Call3[] internal calls;
/**
...
...
@@ -44,13 +44,19 @@ contract FeeVaultWithdrawal is Script {
address recipient = FeeVault(payable(vault)).RECIPIENT();
uint256 balance = vault.balance;
log(balance, recipient, vault);
} else {
string memory logline = string.concat(
vm.toString(vault),
" does not have a large enough balance to withdraw."
);
console.log(logline);
}
}
if (calls.length > 0) {
vm.broadcast();
IMulticall3.Result[] memory results =
multicall.aggregate3(calls);
console.log("Success");
multicall.aggregate3(calls);
console.log("Success
.
");
}
}
...
...
@@ -69,7 +75,7 @@ contract FeeVaultWithdrawal is Script {
*/
function log(uint256 _balance, address _recipient, address _vault) internal view {
string memory logline = string.concat(
"Withdraw
a
ing ",
"Withdrawing ",
vm.toString(_balance),
" to ",
vm.toString(_recipient),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment