Skip to content

Commit

Permalink
Added a batch vault fxn
Browse files Browse the repository at this point in the history
  • Loading branch information
asselstine committed Mar 23, 2023
1 parent c91e5d5 commit 70f5914
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Creates accounts for PoolTogether V5 vaults in batches.

[Deployed on Goerli](https://goerli.etherscan.io/address/0xcaf376aef49dca009afe52e203d0c7a08cb716a5)
[Deployed on Goerli](https://goerli.etherscan.io/address/0x4b1fb48851a2747c324a4f6f77c09ccdf4b15609)

## Usage

Expand Down
2 changes: 1 addition & 1 deletion scripts/verifyGoerli.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
forge verify-contract --chain-id 5 --verifier etherscan 0xcaf376aeF49DCa009AFE52e203d0C7A08cb716a5 UserFaker
forge verify-contract --chain-id 5 --verifier etherscan 0x4B1fB48851A2747C324a4F6f77c09ccDf4b15609 UserFaker
6 changes: 6 additions & 0 deletions src/UserFaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ contract UserFaker {
fakeUserBytecode = MinimalProxyLibrary.minimalProxy(address(fakeUserInstance));
}

function batchSetFakeUsers(Vault[] memory _vaults, uint256 _count, ITokenFaucet _tokenFaucet) public {
for (uint i = 0; i < _vaults.length; i++) {
setFakeUsers(_vaults[i], _count, _tokenFaucet);
}
}

function setFakeUsers(Vault _vault, uint256 _count, ITokenFaucet _tokenFaucet) public {
uint currentCount = vaultFakeUserCount[_vault];
if (_count < currentCount) {
Expand Down

0 comments on commit 70f5914

Please sign in to comment.