From 7a8bc7c9ccb5593632eddf57d98961be99c24d94 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 16:01:38 +0800 Subject: [PATCH 01/16] Adds Timelock to vault, updates factory, proxies, etc --- script/Actors.sol | 6 ++ src/Common.sol | 23 +++++++ src/Factory.sol | 45 ------------- src/ISingleVault.sol | 17 +++++ src/SingleVault.sol | 61 +++++++++++++---- src/VaultFactory.sol | 119 +++++++++++++++++++++++++++++++++ test/factory/create.t.sol | 34 ++++++++-- test/helpers/DeployFactory.sol | 32 +++++++++ test/mocks/MockERC20.sol | 2 +- test/single/access.t.sol | 34 ++++++---- test/single/admin.t.sol | 1 + test/single/deposit.t.sol | 33 ++++++--- test/single/initialize.t.sol | 53 ++++++++++++--- test/single/withdraw.t.sol | 45 ++++++++----- 14 files changed, 392 insertions(+), 113 deletions(-) create mode 100644 src/Common.sol delete mode 100644 src/Factory.sol create mode 100644 src/ISingleVault.sol create mode 100644 src/VaultFactory.sol create mode 100644 test/helpers/DeployFactory.sol create mode 100644 test/single/admin.t.sol diff --git a/script/Actors.sol b/script/Actors.sol index 6da1469..a533bcb 100644 --- a/script/Actors.sol +++ b/script/Actors.sol @@ -5,4 +5,10 @@ contract LocalActors { address public constant ADMIN = address(1); address public constant OPERATOR = address(2); address public constant UNAUTHORIZED = address(3); + + address public constant PROPOSER_1 = address(1); + address public constant PROPOSER_2 = address(2); + + address public constant EXECUTOR_1 = address(3); + address public constant EXECUTOR_2 = address(4); } diff --git a/src/Common.sol b/src/Common.sol new file mode 100644 index 0000000..c15bdab --- /dev/null +++ b/src/Common.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity ^0.8.24; + +import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; + +import {ProxyAdmin} from "lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol"; +import {TransparentUpgradeableProxy} from + "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {TimelockControllerUpgradeable} from + "lib/openzeppelin-contracts-upgradeable/contracts/governance/TimelockControllerUpgradeable.sol"; +import {TimelockController} from "lib/openzeppelin-contracts/contracts/governance/TimelockController.sol"; +import {AccessControlUpgradeable} from + "lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol"; +import {ReentrancyGuardUpgradeable} from + "lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol"; +import {ERC4626Upgradeable} from + "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol"; +import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; +import {IERC4626} from "lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol"; +import {IAccessControl} from "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol"; +import {ERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; + +contract Common {} diff --git a/src/Factory.sol b/src/Factory.sol deleted file mode 100644 index 8b8d0a0..0000000 --- a/src/Factory.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -pragma solidity ^0.8.24; - -import {SingleVault} from "./SingleVault.sol"; -import {TransparentUpgradeableProxy} from - "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; - -contract VaultFactory { - event NewVault(address indexed vault); - - error SymbolTaken(); - - struct Vault { - address vault; - string name; - string symbol; - } - - mapping(string => Vault) public vaults; - - function createSingleVault( - IERC20 asset_, - string memory name_, - string memory symbol_, - address admin_, - address operator_ - ) public returns (address) { - if (vaults[symbol_].vault != address(0)) revert SymbolTaken(); - - SingleVault vaultImplementation = new SingleVault(); - TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( - address(vaultImplementation), - address(this), - abi.encodeWithSignature( - "initialize(address,string,string,address,address)", asset_, name_, symbol_, admin_, operator_ - ) - ); - - vaults[symbol_] = Vault(address(proxy), name_, symbol_); - - emit NewVault(address(proxy)); - return address(proxy); - } -} diff --git a/src/ISingleVault.sol b/src/ISingleVault.sol new file mode 100644 index 0000000..302b95a --- /dev/null +++ b/src/ISingleVault.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity ^0.8.24; + +import {IERC20, IERC4626, IAccessControl} from "src/Common.sol"; + +interface ISingleVault is IERC20, IERC4626, IAccessControl { + function initialize( + IERC20 asset_, + string memory name_, + string memory symbol_, + address admin_, + address operator_, + uint256 minDelay_, + address[] calldata proposers_, + address[] calldata executors_ + ) external; +} diff --git a/src/SingleVault.sol b/src/SingleVault.sol index bd38157..0da9945 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -1,26 +1,61 @@ // SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.24; -import {ERC4626Upgradeable} from - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol"; -import {AccessControlUpgradeable} from - "lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol"; -import {ReentrancyGuardUpgradeable} from - "lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; - -contract SingleVault is ERC4626Upgradeable, AccessControlUpgradeable, ReentrancyGuardUpgradeable { +import { + ERC4626Upgradeable, + AccessControlUpgradeable, + ReentrancyGuardUpgradeable, + TimelockControllerUpgradeable, + IERC20 +} from "src/Common.sol"; + +import {ISingleVault} from "src/ISingleVault.sol"; + +contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgradeable, ReentrancyGuardUpgradeable { bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); - function initialize(IERC20 asset_, string memory name_, string memory symbol_, address admin_, address operator_) - public - initializer - { + constructor() { + _disableInitializers(); + } + + /// @inheritdoc ISingleVault + function initialize( + IERC20 asset_, + string memory name_, + string memory symbol_, + address admin_, + address operator_, + uint256 minDelay_, + address[] calldata proposers_, + address[] calldata executors_ + ) public initializer { + _verifyParamsAreValid(asset_, name_, symbol_, admin_, operator_, proposers_, executors_); + + __TimelockController_init(minDelay_, proposers_, executors_, admin_); __ERC20_init(name_, symbol_); __ERC4626_init(asset_); __AccessControl_init(); __ReentrancyGuard_init(); + _grantRole(DEFAULT_ADMIN_ROLE, admin_); _grantRole(OPERATOR_ROLE, operator_); } + + function _verifyParamsAreValid( + IERC20 asset_, + string memory name_, + string memory symbol_, + address admin_, + address operator_, + address[] memory proposers_, + address[] memory executors_ + ) internal pure { + require(asset_ != IERC20(address(0)), "Asset cannot be zero address"); + require(bytes(name_).length > 0, "Name cannot be empty"); + require(bytes(symbol_).length > 0, "Symbol cannot be empty"); + require(admin_ != address(0), "Admin cannot be zero address"); + require(operator_ != address(0), "Operator cannot be zero address"); + require(proposers_.length > 0, "Proposers cannot be empty"); + require(executors_.length > 0, "Executors cannot be empty"); + } } diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol new file mode 100644 index 0000000..67e5cfc --- /dev/null +++ b/src/VaultFactory.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity ^0.8.24; + +import { + AccessControlUpgradeable, + TransparentUpgradeableProxy, + TimelockController, + ProxyAdmin, + IERC20 +} from "src/Common.sol"; + +contract VaultFactory is AccessControlUpgradeable { + string public constant version = "0.1.0"; + + ProxyAdmin public proxyAdmin; + TimelockController public timelock; + + address public singleVaultImpl; + address public multiVaultImpl; + + struct Vault { + address vault; + string name; + string symbol; + VaultType vaultType; + } + + enum VaultType { + SingleAsset, + MultiAsset + } + + mapping(string => Vault) public vaults; + + event NewVault(address indexed vault, string name, string symbol, VaultType vaultType); + event SetVersion(address indexed implementation, VaultType vaultType); + + error SymbolUsed(); + error ZeroAddress(); + + /** + * @dev Initializes the VaultFactory contract. + * @param singleVaultImpl_ The address of the SingleVault implementation contract. + * @param proposers Array of addresses that can propose transactions. + * @param executors Array of addresses that can execute transactions. + * @param minDelay The minimum delay in seconds before a proposed transaction can be executed. + * @param admin The address of the administrator. + */ + constructor( + address singleVaultImpl_, + address[] memory proposers, + address[] memory executors, + uint256 minDelay, + address admin + ) { + _grantRole(DEFAULT_ADMIN_ROLE, admin); + timelock = new TimelockController(minDelay, proposers, executors, admin); + proxyAdmin = new ProxyAdmin(address(timelock)); + singleVaultImpl = singleVaultImpl_; + } + + /** + * @dev Creates a new SingleVault instance and deploys it behind a proxy. + * @param asset_ The ERC20 asset to be used by the vault. + * @param name_ The name of the vault. + * @param symbol_ The symbol of the vault. + * @param admin_ The address of the admin. + * @param operator_ The address of the operator. + * @param minDelay_ The timelock delay for transactions. + * @param proposers_ Array of transaction proposers. + * @param executors_ Array of transaction executors. + * @return address The address of the newly created vault. + */ + function createSingleVault( + IERC20 asset_, + string memory name_, + string memory symbol_, + address admin_, + address operator_, + uint256 minDelay_, + address[] memory proposers_, + address[] memory executors_ + ) public onlyRole(DEFAULT_ADMIN_ROLE) returns (address) { + if (vaults[symbol_].vault != address(0)) revert SymbolUsed(); + + string memory funcSig = "initialize(address,string,string,address,address,uint256,address[],address[])"; + + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + singleVaultImpl, + address(proxyAdmin), + abi.encodeWithSignature( + funcSig, + asset_, + name_, + symbol_, + admin_, + operator_, + minDelay_, + proposers_, + executors_ + ) + ); + + vaults[symbol_] = Vault(address(proxy), name_, symbol_, VaultType.SingleAsset); + emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); + return address(proxy); + } + + /** + * @dev Sets the SingleVault implementation contract address. + * @param implementation_ The address of the SingleVault implementation contract. + * @param vaultType Enum VaultType + */ + function setVaultVersion(address implementation_, VaultType vaultType) public onlyRole(DEFAULT_ADMIN_ROLE) { + if (implementation_ == address(0)) revert ZeroAddress(); + vaultType == VaultType.SingleAsset ? singleVaultImpl = implementation_ : multiVaultImpl = implementation_; + emit SetVersion(implementation_, vaultType); + } +} diff --git a/test/factory/create.t.sol b/test/factory/create.t.sol index 666ad07..0e71346 100644 --- a/test/factory/create.t.sol +++ b/test/factory/create.t.sol @@ -2,29 +2,51 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Test.sol"; -import {VaultFactory} from "src/Factory.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; +import {IERC20, ProxyAdmin} from "src/Common.sol"; import {MockERC20} from "test/mocks/MockERC20.sol"; import {LocalActors} from "script/Actors.sol"; import {TestConstants} from "test/helpers/Constants.sol"; +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault} from "src/SingleVault.sol"; contract CreateTest is Test, LocalActors, TestConstants { VaultFactory public factory; IERC20 public asset; + uint256 minDelay; + address[] proposers; + address[] executors; function setUp() public { - factory = new VaultFactory(); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); + proposers = [PROPOSER_1, PROPOSER_2]; + executors = [EXECUTOR_1, EXECUTOR_2]; + minDelay = 0; + address singleVaultImpl = address(new SingleVault()); + factory = new VaultFactory(singleVaultImpl, proposers, executors, minDelay, ADMIN); } function testCreateSingleVault() public { - address vault = factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR); - (address vaultAddress,,) = factory.vaults(VAULT_SYMBOL); + vm.startPrank(ADMIN); + address vault = + factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR, minDelay, proposers, executors); + (address vaultAddress,,,) = factory.vaults(VAULT_SYMBOL); assertEq(vaultAddress, vault, "Vault address should match the expected address"); } + function testVaultFactoryAdmin() public view { + assertTrue(factory.hasRole(factory.DEFAULT_ADMIN_ROLE(), ADMIN)); + } + + function testProxyOwner() public view { + ProxyAdmin proxyAdmin = ProxyAdmin(factory.proxyAdmin()); + address proxyOwner = proxyAdmin.owner(); + address timelock = address(factory.timelock()); + + assertEq(proxyOwner, timelock); + } + function skip_testCreateSingleVaultRevertsIfNotAdmin() public { vm.expectRevert(abi.encodeWithSelector(bytes4(keccak256("AccessControl: must have admin role")))); - factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR); + factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR, minDelay, proposers, executors); } } diff --git a/test/helpers/DeployFactory.sol b/test/helpers/DeployFactory.sol new file mode 100644 index 0000000..e9442b4 --- /dev/null +++ b/test/helpers/DeployFactory.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity ^0.8.24; + +import {VaultFactory} from "src/VaultFactory.sol"; +import {LocalActors} from "script/Actors.sol"; +import {SingleVault} from "src/SingleVault.sol"; +import {IERC20} from "src/Common.sol"; + +contract DeployFactory is LocalActors { + address[] public proposers = new address[](2); + address[] public executors = new address[](2); + + function deploy(uint256 minDelay) public returns (VaultFactory) { + address singleVaultImpl = address(new SingleVault()); + + proposers = [PROPOSER_1, PROPOSER_2]; + executors = [EXECUTOR_1, EXECUTOR_2]; + + VaultFactory factory = new VaultFactory(singleVaultImpl, proposers, executors, minDelay, ADMIN); + return factory; + } + + function getProposers() public returns (address[] memory) { + proposers = [PROPOSER_1, PROPOSER_2]; + return proposers; + } + + function getExecutors() public returns (address[] memory) { + executors = [EXECUTOR_1, EXECUTOR_2]; + return executors; + } +} diff --git a/test/mocks/MockERC20.sol b/test/mocks/MockERC20.sol index 021d085..3b9ef1c 100644 --- a/test/mocks/MockERC20.sol +++ b/test/mocks/MockERC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.24; -import {ERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; +import {ERC20} from "src/Common.sol"; contract MockERC20 is ERC20 { constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) { diff --git a/test/single/access.t.sol b/test/single/access.t.sol index fa6e1db..7ffd7f9 100644 --- a/test/single/access.t.sol +++ b/test/single/access.t.sol @@ -2,26 +2,34 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Test.sol"; -import {SingleVault} from "src/SingleVault.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; -import {MockERC20} from "test/mocks/MockERC20.sol"; -import { - AccessControlUpgradeable, - IAccessControl -} from "lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol"; -import {IAccessControl} from "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol"; +import {AccessControlUpgradeable, IAccessControl, IERC20, IAccessControl} from "src/Common.sol"; import {LocalActors} from "script/Actors.sol"; +import {SingleVault, ISingleVault} from "src/SingleVault.sol"; +import {TestConstants} from "test/helpers/Constants.sol"; +import {MockERC20} from "test/mocks/MockERC20.sol"; +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; -contract AccessControlTest is Test, LocalActors { +contract AccessControlTest is Test, LocalActors, TestConstants { SingleVault public vault; IERC20 public asset; function setUp() public { - asset = IERC20(address(new MockERC20("Test Asset", "TST"))); - vault = new SingleVault(); + vm.startPrank(ADMIN); + asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); + DeployFactory deployFactory = new DeployFactory(); + VaultFactory factory = deployFactory.deploy(0); - vm.prank(address(1)); - vault.initialize(asset, "Test Vault", "ynTEST", ADMIN, OPERATOR); + address vaultAddress = factory.createSingleVault( + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, // time delay + deployFactory.getProposers(), + deployFactory.getExecutors() + ); + vault = SingleVault(payable(vaultAddress)); } function testAdminRoleSet() public view { diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol new file mode 100644 index 0000000..77146b2 --- /dev/null +++ b/test/single/admin.t.sol @@ -0,0 +1 @@ +/// TODO: Write Vault Transaction Tests \ No newline at end of file diff --git a/test/single/deposit.t.sol b/test/single/deposit.t.sol index e494db9..6431edd 100644 --- a/test/single/deposit.t.sol +++ b/test/single/deposit.t.sol @@ -2,32 +2,43 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Test.sol"; -import {SingleVault} from "src/SingleVault.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; +import {IERC20, IERC4626} from "src/Common.sol"; import {MockERC20} from "test/mocks/MockERC20.sol"; import {LocalActors} from "script/Actors.sol"; import {TestConstants} from "test/helpers/Constants.sol"; -import {IERC4626} from "lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol"; +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault, ISingleVault} from "src/SingleVault.sol"; contract DepositTest is Test, LocalActors, TestConstants { SingleVault public vault; IERC20 public asset; function setUp() public { + vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); - vault = new SingleVault(); - - vm.prank(address(1)); - vault.initialize(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR); + DeployFactory deployFactory = new DeployFactory(); + VaultFactory factory = deployFactory.deploy(0); + + address vaultAddress = factory.createSingleVault( + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, // time delay + deployFactory.getProposers(), + deployFactory.getExecutors() + ); + vault = SingleVault(payable(vaultAddress)); } function testDeposit() public { uint256 amount = 100 * 10 ** 18; // Assuming 18 decimals for the asset asset.approve(address(vault), amount); - uint256 shares = vault.deposit(amount, address(this)); + uint256 shares = vault.deposit(amount, ADMIN); assertEq(shares, amount, "Shares should be equal to the amount deposited"); - assertEq(vault.balanceOf(address(this)), shares, "Balance of the user should be updated"); + assertEq(vault.balanceOf(ADMIN), shares, "Balance of the user should be updated"); assertEq(asset.balanceOf(address(vault)), amount, "Vault should have received the asset"); assertEq(vault.totalAssets(), amount, "Vault totalAsset should be amount deposited"); assertEq(vault.totalSupply(), amount, "Vault totalSupply should be amount deposited"); @@ -37,12 +48,12 @@ contract DepositTest is Test, LocalActors, TestConstants { uint256 amount = 100 * 10 ** 18; // Assuming 18 decimals for the asset vm.expectRevert(abi.encodeWithSelector(IERC20.approve.selector, address(vault), amount)); - vault.deposit(amount, address(this)); + vault.deposit(amount, ADMIN); } function skip_testDepositRevertsIfAmountIsZero() public { vm.startPrank(ADMIN); vm.expectRevert(abi.encodeWithSelector(IERC4626.deposit.selector, 0)); - vault.deposit(0, address(this)); + vault.deposit(0, ADMIN); } } diff --git a/test/single/initialize.t.sol b/test/single/initialize.t.sol index 9fd0fa5..aa48ac3 100644 --- a/test/single/initialize.t.sol +++ b/test/single/initialize.t.sol @@ -3,27 +3,62 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Test.sol"; import {SingleVault} from "src/SingleVault.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; +import {IERC20, TransparentUpgradeableProxy} from "src/Common.sol"; import {MockERC20} from "test/mocks/MockERC20.sol"; import {LocalActors} from "script/Actors.sol"; import {TestConstants} from "test/helpers/Constants.sol"; +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault, ISingleVault} from "src/SingleVault.sol"; contract InitializeTest is Test, LocalActors, TestConstants { SingleVault public vault; + DeployFactory public deployFactory; + VaultFactory public factory; IERC20 public asset; function setUp() public { + vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); - vault = new SingleVault(); + deployFactory = new DeployFactory(); + factory = deployFactory.deploy(0); + + address vaultAddress = factory.createSingleVault( + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, // time delay + deployFactory.getProposers(), + deployFactory.getExecutors() + ); + vault = SingleVault(payable(vaultAddress)); } function testInitialize() public { - vm.prank(address(1)); - vault.initialize(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR); - assertEq(vault.asset(), address(asset)); - assertEq(vault.hasRole(vault.OPERATOR_ROLE(), OPERATOR), true); - assertEq(vault.hasRole(vault.DEFAULT_ADMIN_ROLE(), ADMIN), true); - assertEq(vault.symbol(), VAULT_SYMBOL); - assertEq(vault.name(), VAULT_NAME); + SingleVault vaultImplementation = new SingleVault(); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(vaultImplementation), + address(this), + abi.encodeWithSignature( + "initialize(address,string,string,address,address,uint256,address[],address[])", + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, + deployFactory.getProposers(), + deployFactory.getExecutors() + ) + ); + + ISingleVault newVault = ISingleVault(address(proxy)); + + assertEq(newVault.asset(), address(asset)); + assertEq(newVault.hasRole(vault.OPERATOR_ROLE(), OPERATOR), true); + assertEq(newVault.hasRole(vault.DEFAULT_ADMIN_ROLE(), ADMIN), true); + assertEq(newVault.symbol(), VAULT_SYMBOL); + assertEq(newVault.name(), VAULT_NAME); } } diff --git a/test/single/withdraw.t.sol b/test/single/withdraw.t.sol index 25144d8..5becd28 100644 --- a/test/single/withdraw.t.sol +++ b/test/single/withdraw.t.sol @@ -8,53 +8,68 @@ import {MockERC20} from "test/mocks/MockERC20.sol"; import {LocalActors} from "script/Actors.sol"; import {TestConstants} from "test/helpers/Constants.sol"; import {IERC4626} from "lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol"; +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault, ISingleVault} from "src/SingleVault.sol"; contract WithdrawTest is Test, LocalActors, TestConstants { SingleVault public vault; IERC20 public asset; function setUp() public { + vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); - vault = new SingleVault(); + DeployFactory deployFactory = new DeployFactory(); + VaultFactory factory = deployFactory.deploy(0); - vm.prank(address(1)); - vault.initialize(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR); + address vaultAddress = factory.createSingleVault( + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, // admin tx time delay + deployFactory.getProposers(), + deployFactory.getExecutors() + ); + vault = SingleVault(payable(vaultAddress)); } function testWithdraw() public { + vm.startPrank(ADMIN); uint256 amount = 100 * 10 ** 18; asset.approve(address(vault), amount); - vault.deposit(amount, address(this)); + vault.deposit(amount, ADMIN); - uint256 shares = vault.balanceOf(address(this)); + uint256 shares = vault.balanceOf(ADMIN); uint256 expectedAssets = vault.convertToAssets(shares); - uint256 previousBalance = asset.balanceOf(address(this)); + uint256 previousBalance = asset.balanceOf(ADMIN); - uint256 assetsReceived = vault.withdraw(shares, address(this), address(this)); - uint256 newNetBalance = asset.balanceOf(address(this)) - previousBalance; + uint256 assetsReceived = vault.withdraw(shares, ADMIN, ADMIN); + uint256 newNetBalance = asset.balanceOf(ADMIN) - previousBalance; assertEq(assetsReceived, expectedAssets, "Assets received should be equal to the expected amount"); assertEq(newNetBalance, expectedAssets, "User should have received the expected amount of assets"); - assertEq(vault.balanceOf(address(this)), 0, "User's balance in the vault should be zero after withdrawal"); + assertEq(vault.balanceOf(ADMIN), 0, "User's balance in the vault should be zero after withdrawal"); assertEq(vault.totalAssets(), 0, "Vault totalAssets should be zero after withdrawal"); assertEq(vault.totalSupply(), 0, "Vault totalSupply should be zero after withdrawal"); + vm.stopPrank(); } function skip_testWithdrawRevertsIfNotApproved() public { uint256 amount = 100 * 10 ** 18; asset.approve(address(vault), amount); - vault.deposit(amount, address(this)); + vault.deposit(amount, ADMIN); - uint256 shares = vault.balanceOf(address(this)); + uint256 shares = vault.balanceOf(ADMIN); - vm.expectRevert(abi.encodeWithSelector(IERC20.approve.selector, address(vault), shares)); - vm.prank(address(this)); - vault.withdraw(shares, address(this), address(this)); + vm.expectRevert(abi.encodeWithSelector(IERC20.approve.selector, ADMIN, shares)); + vm.prank(ADMIN); + vault.withdraw(shares, ADMIN, ADMIN); } function skip_testWithdrawRevertsIfAmountIsZero() public { vm.startPrank(ADMIN); vm.expectRevert(abi.encodeWithSelector(IERC4626.withdraw.selector, 0)); - vault.withdraw(0, address(this), address(this)); + vault.withdraw(0, ADMIN, ADMIN); } } From 1dc9686f9456d2e5ce77e5120fe6cd1dd7fef47b Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 18:00:09 +0800 Subject: [PATCH 02/16] Update schedule tx test --- test/single/admin.t.sol | 91 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol index 77146b2..bc46d59 100644 --- a/test/single/admin.t.sol +++ b/test/single/admin.t.sol @@ -1 +1,90 @@ -/// TODO: Write Vault Transaction Tests \ No newline at end of file +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity ^0.8.24; + +import "lib/forge-std/src/Test.sol"; +import {SingleVault} from "src/SingleVault.sol"; +import {IERC20,TimelockControllerUpgradeable} from "src/Common.sol"; +import {MockERC20} from "test/mocks/MockERC20.sol"; +import {LocalActors} from "script/Actors.sol"; +import {TestConstants} from "test/helpers/Constants.sol"; +import {DeployFactory,VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault,ISingleVault} from "src/SingleVault.sol"; + + +contract TimelockTest is Test, LocalActors, TestConstants { + SingleVault public vault; + IERC20 public asset; + + enum OperationState { + Unset, + Waiting, + Ready, + Done + } + + function setUp() public { + vm.startPrank(ADMIN); + asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); + DeployFactory deployFactory = new DeployFactory(); + VaultFactory factory = deployFactory.deploy(0); + + address vaultAddress = factory.createSingleVault( + asset, + VAULT_NAME, + VAULT_SYMBOL, + ADMIN, + OPERATOR, + 0, // admin tx time delay + deployFactory.getProposers(), + deployFactory.getExecutors() + ); + vault = SingleVault(payable(vaultAddress)); + } + + function testScheduleTransaction() public { + uint256 amount = 100 * 10 ** 18; + asset.approve(address(vault), amount); + vault.deposit(amount, ADMIN); + + uint256 shares = vault.balanceOf(ADMIN); + + // schedule a transaction + address target = address(asset); + uint256 value = 0; + bytes memory data = abi.encodeWithSelector(IERC20.transfer.selector, ADMIN, shares); + bytes32 predecessor = bytes32(0); + bytes32 salt = keccak256("chad"); + uint256 delay = 1; + + vm.startPrank(PROPOSER_1); + vault.schedule(target, value, data, predecessor, salt, delay); + vm.stopPrank(); + + bytes32 id = keccak256(abi.encode(target, value, data, predecessor, salt)); + // timestamp should be block 1 of the foundry test, plus 0 for the delay. + assertEq(vault.getTimestamp(id), 2); + + assert(vault.getOperationState(id) == TimelockControllerUpgradeable.OperationState.Waiting); + + assertEq(vault.isOperationReady(id), false); + assertEq(vault.isOperationDone(id), false); + assertEq(vault.isOperation(id), true); + + uint256 previousBalance = asset.balanceOf(ADMIN); + + + //execute the transaction + vm.warp(10); + vm.startPrank(EXECUTOR_1); + vault.execute(target, value, data, predecessor, salt); + + uint256 currentBalance = asset.balanceOf(ADMIN); + uint256 expectedBalance = currentBalance - previousBalance; + + // // Verify the transaction was executed successfully + assertEq(shares, expectedBalance); + assertEq(vault.isOperationReady(id), false); + assertEq(vault.isOperationDone(id), true); + assert(vault.getOperationState(id) == TimelockControllerUpgradeable.OperationState.Done); + } +} From eb5e562d7f8ca9d8ad1df9979f70a7e9d57fa829 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 18:00:55 +0800 Subject: [PATCH 03/16] Format --- src/VaultFactory.sol | 10 +--------- test/single/admin.t.sol | 8 +++----- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index 67e5cfc..8f4a831 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -89,15 +89,7 @@ contract VaultFactory is AccessControlUpgradeable { singleVaultImpl, address(proxyAdmin), abi.encodeWithSignature( - funcSig, - asset_, - name_, - symbol_, - admin_, - operator_, - minDelay_, - proposers_, - executors_ + funcSig, asset_, name_, symbol_, admin_, operator_, minDelay_, proposers_, executors_ ) ); diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol index bc46d59..14b02c8 100644 --- a/test/single/admin.t.sol +++ b/test/single/admin.t.sol @@ -3,13 +3,12 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Test.sol"; import {SingleVault} from "src/SingleVault.sol"; -import {IERC20,TimelockControllerUpgradeable} from "src/Common.sol"; +import {IERC20, TimelockControllerUpgradeable} from "src/Common.sol"; import {MockERC20} from "test/mocks/MockERC20.sol"; import {LocalActors} from "script/Actors.sol"; import {TestConstants} from "test/helpers/Constants.sol"; -import {DeployFactory,VaultFactory} from "test/helpers/DeployFactory.sol"; -import {SingleVault,ISingleVault} from "src/SingleVault.sol"; - +import {DeployFactory, VaultFactory} from "test/helpers/DeployFactory.sol"; +import {SingleVault, ISingleVault} from "src/SingleVault.sol"; contract TimelockTest is Test, LocalActors, TestConstants { SingleVault public vault; @@ -72,7 +71,6 @@ contract TimelockTest is Test, LocalActors, TestConstants { uint256 previousBalance = asset.balanceOf(ADMIN); - //execute the transaction vm.warp(10); vm.startPrank(EXECUTOR_1); From 9835fe1e0da034822aad9a1edf9fbda744dd45dd Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:23:42 +0800 Subject: [PATCH 04/16] Adds scripts and makefile --- .github/workflows/test.yml | 2 +- Makefile | 10 + README.md | 64 +--- .../17000/run-1724670724.json | 336 ++++++++++++++++++ .../17000/run-latest.json | 336 ++++++++++++++++++ script/Actors.sol | 37 +- script/DeployVaultFactory.sol | 47 +++ src/Common.sol | 1 - 8 files changed, 776 insertions(+), 57 deletions(-) create mode 100644 Makefile create mode 100644 broadcast/DeployVaultFactory.sol/17000/run-1724670724.json create mode 100644 broadcast/DeployVaultFactory.sol/17000/run-latest.json create mode 100644 script/DeployVaultFactory.sol diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 762a296..a44b42d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: Run Forge build run: | - forge build --sizes + forge build --sizes --skip DeployFactory.sol id: build - name: Run Forge tests diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f6ca83f --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + + +account :; cast wallet import $(ACCOUNT_NAME) --interactive + +factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ + --account $(ACCOUNT_NAME) \ + --rpc-url $(RPC_URL) \ + --broadcast \ + --etherscan-api-key $(ETHERSCAN_KEY) \ + --verify \ No newline at end of file diff --git a/README.md b/README.md index 9265b45..34fac15 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,22 @@ -## Foundry +## YieldNest Vault -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** -Foundry consists of: +This is a general purpose starter vault for rapid deployment against new opportunies. -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. -## Documentation +## Test Deployment -https://book.getfoundry.sh/ - -## Usage - -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt ``` +anvil // --fork-url https://holesky-rpc -### Gas Snapshots +export ACCOUNT_NAME=deployer +make account -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy +export RPC_URL= +export ETHERSCAN_KEY= -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key +make factory ``` -### Cast +This will deploy the factory, from which you can create a new vault. -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` diff --git a/broadcast/DeployVaultFactory.sol/17000/run-1724670724.json b/broadcast/DeployVaultFactory.sol/17000/run-1724670724.json new file mode 100644 index 0000000..15caae7 --- /dev/null +++ b/broadcast/DeployVaultFactory.sol/17000/run-1724670724.json @@ -0,0 +1,336 @@ +{ + "transactions": [ + { + "hash": "0x13788e059d89528a773de059dc043d716fa0f83654b807fccc8370e3d5314579", + "transactionType": "CREATE", + "contractName": "HoleskyActors", + "contractAddress": "0x1c39ba375fab6a9f6e0c01b9f49d488e101c2011", + "function": null, + "arguments": null, + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x22dd3", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50610105806100206000396000f3fe6080604052348015600f57600080fd5b506004361060735760003560e01c8063364061961160545780633640619614609b578063497865501460b557806389a3d3951460b5578063983d27371460b557600080fd5b8063075fd2b11460785780632a0acc6a14609b5780632e671ffa14609b575b600080fd5b607f600081565b6040516001600160a01b03909116815260200160405180910390f35b607f73743b91cdb1c694d4f51bcda3a4a59dcc0d02b91381565b607f739dd8f69b62ddfd990241530f47dced0dad7f7d398156fea2646970667358221220409d9e3ae4aeb0a007635e37a40557ceb3abeefc255e9d88dc3852166aa3cb0a64736f6c63430008180033", + "nonce": "0x1c9", + "chainId": "0x4268" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionType": "CREATE", + "contractName": "SingleVault", + "contractAddress": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "function": null, + "arguments": null, + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x40b2a1", + "value": "0x0", + "input": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b61399380620000e66000396000f3fe6080604052600436106103545760003560e01c80637958004c116101c6578063bc197c81116100f7578063d905777e11610095578063ef8b30f71161006f578063ef8b30f714610920578063f23a6e6114610a0d578063f27a0c9214610a39578063f5b541a614610a6d57600080fd5b8063d905777e146109ba578063dd62ed3e146109da578063e38335e5146109fa57600080fd5b8063c6e6f592116100d1578063c6e6f59214610920578063ce96cb7714610940578063d45c443514610960578063d547741f1461099a57600080fd5b8063bc197c81146108d4578063c4d252f514610900578063c63d75b61461064557600080fd5b8063a217fddf11610164578063b1c5f4271161013e578063b1c5f42714610854578063b3d7f6b914610874578063b460af9414610894578063ba087652146108b457600080fd5b8063a217fddf146107eb578063a9059cbb14610800578063b08e51c01461082057600080fd5b80638f61f4f5116101a05780638f61f4f51461077457806391d148541461079657806394bf804d146107b657806395d89b41146107d657600080fd5b80637958004c146107075780638065657f146107345780638f2a0bb01461075457600080fd5b8063248a9ca3116102a0578063402d267d1161023e57806364d623531161021857806364d623531461068757806365603dc3146106a75780636e553f65146106c757806370a08231146106e757600080fd5b8063402d267d146106455780634cdad506146103fc578063584b153e1461066757600080fd5b8063313ce5671161027a578063313ce567146105a957806331d50750146105d057806336568abe146105f057806338d52e0f1461061057600080fd5b8063248a9ca3146105495780632ab0f529146105695780632f2ff15d1461058957600080fd5b8063095ea7b31161030d57806313bc9f20116102e757806313bc9f2014610491578063150b7a02146104b157806318160ddd146104f557806323b872dd1461052957600080fd5b8063095ea7b31461043e5780630a28a4771461045e578063134008d31461047e57600080fd5b806301d5062a1461036057806301e1d1141461038257806301ffc9a7146103aa57806306fdde03146103da57806307a2d13a146103fc57806307bd02651461041c57600080fd5b3661035b57005b600080fd5b34801561036c57600080fd5b5061038061037b366004612b07565b610aa1565b005b34801561038e57600080fd5b50610397610b65565b6040519081526020015b60405180910390f35b3480156103b657600080fd5b506103ca6103c5366004612b7d565b610be9565b60405190151581526020016103a1565b3480156103e657600080fd5b506103ef610bfa565b6040516103a19190612bcb565b34801561040857600080fd5b50610397610417366004612bfe565b610cbd565b34801561042857600080fd5b5061039760008051602061393e83398151915281565b34801561044a57600080fd5b506103ca610459366004612c17565b610cca565b34801561046a57600080fd5b50610397610479366004612bfe565b610ce2565b61038061048c366004612c43565b610cef565b34801561049d57600080fd5b506103ca6104ac366004612bfe565b610d92565b3480156104bd57600080fd5b506104dc6104cc366004612d65565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016103a1565b34801561050157600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0254610397565b34801561053557600080fd5b506103ca610544366004612dd0565b610db8565b34801561055557600080fd5b50610397610564366004612bfe565b610dde565b34801561057557600080fd5b506103ca610584366004612bfe565b610e00565b34801561059557600080fd5b506103806105a4366004612e11565b610e09565b3480156105b557600080fd5b506105be610e2b565b60405160ff90911681526020016103a1565b3480156105dc57600080fd5b506103ca6105eb366004612bfe565b610e57565b3480156105fc57600080fd5b5061038061060b366004612e11565b610e7c565b34801561061c57600080fd5b506000805160206138fe833981519152546040516001600160a01b0390911681526020016103a1565b34801561065157600080fd5b50610397610660366004612e41565b5060001990565b34801561067357600080fd5b506103ca610682366004612bfe565b610eb4565b34801561069357600080fd5b506103806106a2366004612bfe565b610ef9565b3480156106b357600080fd5b506103806106c2366004612ea2565b610f7e565b3480156106d357600080fd5b506103976106e2366004612e11565b6111e6565b3480156106f357600080fd5b50610397610702366004612e41565b61120c565b34801561071357600080fd5b50610727610722366004612bfe565b611234565b6040516103a19190612faf565b34801561074057600080fd5b5061039761074f366004612c43565b611292565b34801561076057600080fd5b5061038061076f366004612fd7565b6112d1565b34801561078057600080fd5b5061039760008051602061391e83398151915281565b3480156107a257600080fd5b506103ca6107b1366004612e11565b61144d565b3480156107c257600080fd5b506103976107d1366004612e11565b611485565b3480156107e257600080fd5b506103ef6114a3565b3480156107f757600080fd5b50610397600081565b34801561080c57600080fd5b506103ca61081b366004612c17565b6114e2565b34801561082c57600080fd5b506103977ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b34801561086057600080fd5b5061039761086f366004613088565b6114f0565b34801561088057600080fd5b5061039761088f366004612bfe565b611535565b3480156108a057600080fd5b506103976108af366004613130565b611542565b3480156108c057600080fd5b506103976108cf366004613130565b61159a565b3480156108e057600080fd5b506104dc6108ef3660046131f1565b63bc197c8160e01b95945050505050565b34801561090c57600080fd5b5061038061091b366004612bfe565b6115e9565b34801561092c57600080fd5b5061039761093b366004612bfe565b6116a4565b34801561094c57600080fd5b5061039761095b366004612e41565b6116b1565b34801561096c57600080fd5b5061039761097b366004612bfe565b600090815260008051602061389e833981519152602052604090205490565b3480156109a657600080fd5b506103806109b5366004612e11565b6116c6565b3480156109c657600080fd5b506103976109d5366004612e41565b6116e2565b3480156109e657600080fd5b506103976109f536600461329e565b6116ed565b610380610a08366004613088565b611737565b348015610a1957600080fd5b506104dc610a283660046132cc565b63f23a6e6160e01b95945050505050565b348015610a4557600080fd5b507f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360154610397565b348015610a7957600080fd5b506103977f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60008051602061391e833981519152610ab9816118ac565b6000610ac9898989898989611292565b9050610ad581846118b9565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610b119695949392919061335d565b60405180910390a38315610b5a57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b5191815260200190565b60405180910390a25b505050505050505050565b6000806000805160206138fe83398151915280546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be3919061339a565b91505090565b6000610bf48261197c565b92915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060916000805160206138be83398151915291610c39906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c65906133b3565b8015610cb25780601f10610c8757610100808354040283529160200191610cb2565b820191906000526020600020905b815481529060010190602001808311610c9557829003601f168201915b505050505091505090565b6000610bf48260006119a1565b600033610cd88185856119fa565b5060019392505050565b6000610bf4826001611a07565b60008051602061393e833981519152610d0981600061144d565b610d1757610d178133611a56565b6000610d27888888888888611292565b9050610d338185611a93565b610d3f88888888611ae1565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a604051610d7794939291906133e7565b60405180910390a3610d8881611b59565b5050505050505050565b600060025b610da083611234565b6003811115610db157610db1612f99565b1492915050565b600033610dc6858285611b92565b610dd1858585611bdf565b60019150505b9392505050565b60009081526000805160206138de833981519152602052604090206001015490565b60006003610d97565b610e1282610dde565b610e1b816118ac565b610e258383611c3e565b50505050565b6000806000805160206138fe833981519152905060008154610be39190600160a01b900460ff16613425565b600080610e6383611234565b6003811115610e7457610e74612f99565b141592915050565b6001600160a01b0381163314610ea55760405163334bd91960e11b815260040160405180910390fd5b610eaf8282611ce3565b505050565b600080610ec083611234565b90506001816003811115610ed657610ed6612f99565b1480610dd757506002816003811115610ef157610ef1612f99565b149392505050565b60008051602061389e83398151915233308114610f395760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b600182015460408051918252602082018590527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15060010155565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015610fc35750825b90506000826001600160401b03166001148015610fdf5750303b155b905081158015610fed575080155b1561100b5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561103557845460ff60401b1916600160401b1785555b6110b88f8f8f8f8f8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d5f92505050565b6111358a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508f611f95565b61113f8e8e611fa9565b6111488f611fbb565b611150611fcc565b611158611fd6565b61116360008d611c3e565b5061118e7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298c611c3e565b5083156111d557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b600060001960006111f6856116a4565b905061120433858784611fe6565b949350505050565b6001600160a01b031660009081526000805160206138be833981519152602052604090205490565b600081815260008051602061389e8339815191526020526040812054806000036112615750600092915050565b600181036112725750600392915050565b428111156112835750600192915050565b50600292915050565b50919050565b60008686868686866040516020016112af9695949392919061335d565b6040516020818303038152906040528051906020012090509695505050505050565b60008051602061391e8339815191526112e9816118ac565b88871415806112f85750888514155b1561132a576040516001624fcdef60e01b03198152600481018a90526024810186905260448101889052606401610f30565b600061133c8b8b8b8b8b8b8b8b6114f0565b905061134881846118b9565b60005b8a8110156113fe5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e858181106113885761138861345f565b905060200201602081019061139d9190612e41565b8d8d868181106113af576113af61345f565b905060200201358c8c878181106113c8576113c861345f565b90506020028101906113da9190613475565b8c8b6040516113ee9695949392919061335d565b60405180910390a360010161134b565b50831561144057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161143791815260200190565b60405180910390a25b5050505050505050505050565b60009182526000805160206138de833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600019600061149585611535565b905061120433858388611fe6565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060916000805160206138be83398151915291610c39906133b3565b600033610cd8818585611bdf565b60008888888888888888604051602001611511989796959493929190613551565b60405160208183030381529060405280519060200120905098975050505050505050565b6000610bf48260016119a1565b60008061154e836116b1565b90508085111561157757828582604051633fa733bb60e21b8152600401610f309392919061343e565b600061158286610ce2565b90506115913386868985612073565b95945050505050565b6000806115a6836116e2565b9050808511156115cf57828582604051632e52afbb60e21b8152600401610f309392919061343e565b60006115da86610cbd565b9050611591338686848a612073565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783611613816118ac565b60008051602061389e83398151915261162b83610eb4565b611667578261163a6002612128565b6116446001612128565b604051635ead8eb560e01b81526004810193909352176024820152604401610f30565b6000838152602082905260408082208290555184917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a2505050565b6000610bf4826000611a07565b6000610bf46116bf8361120c565b60006119a1565b6116cf82610dde565b6116d8816118ac565b610e258383611ce3565b6000610bf48261120c565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b60008051602061393e83398151915261175181600061144d565b61175f5761175f8133611a56565b878614158061176e5750878414155b156117a0576040516001624fcdef60e01b03198152600481018990526024810185905260448101879052606401610f30565b60006117b28a8a8a8a8a8a8a8a6114f0565b90506117be8185611a93565b60005b898110156118965760008b8b838181106117dd576117dd61345f565b90506020020160208101906117f29190612e41565b905060008a8a848181106118085761180861345f565b9050602002013590503660008a8a868181106118265761182661345f565b90506020028101906118389190613475565b9150915061184884848484611ae1565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588686868660405161187f94939291906133e7565b60405180910390a3505050508060010190506117c1565b506118a081611b59565b50505050505050505050565b6118b68133611a56565b50565b60008051602061389e8339815191526118d183610e57565b1561190357826118e16000612128565b604051635ead8eb560e01b815260048101929092526024820152604401610f30565b600061192d7f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015490565b90508083101561195a57604051635433660960e01b81526004810184905260248101829052604401610f30565b61196483426135f4565b60009485526020929092525060409092209190915550565b60006001600160e01b03198216630271189760e51b1480610bf45750610bf48261214b565b6000610dd76119ae610b65565b6119b99060016135f4565b6119c56000600a6136eb565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546119f191906135f4565b85919085612180565b610eaf83838360016121cf565b6000610dd7611a1782600a6136eb565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0254611a4391906135f4565b611a4b610b65565b6119f19060016135f4565b611a60828261144d565b611a8f5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610f30565b5050565b611a9c82610d92565b611aab57816118e16002612128565b8015801590611ac05750611abe81610e00565b155b15611a8f5760405163121534c360e31b815260048101829052602401610f30565b600080856001600160a01b0316858585604051611aff9291906136fa565b60006040518083038185875af1925050503d8060008114611b3c576040519150601f19603f3d011682016040523d82523d6000602084013e611b41565b606091505b5091509150611b5082826122ae565b50505050505050565b60008051602061389e833981519152611b7182610d92565b611b8057816118e16002612128565b60009182526020526040902060019055565b6000611b9e84846116ed565b90506000198114610e255781811015611bd057828183604051637dc7a0d960e11b8152600401610f309392919061343e565b610e25848484840360006121cf565b6001600160a01b038316611c0957604051634b637e8f60e11b815260006004820152602401610f30565b6001600160a01b038216611c335760405163ec442f0560e01b815260006004820152602401610f30565b610eaf8383836122ca565b60006000805160206138de833981519152611c59848461144d565b611cd9576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055611c8f3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610bf4565b6000915050610bf4565b60006000805160206138de833981519152611cfe848461144d565b15611cd9576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610bf4565b6001600160a01b038716611db55760405162461bcd60e51b815260206004820152601c60248201527f41737365742063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610f30565b6000865111611dfd5760405162461bcd60e51b81526020600482015260146024820152734e616d652063616e6e6f7420626520656d70747960601b6044820152606401610f30565b6000855111611e475760405162461bcd60e51b815260206004820152601660248201527553796d626f6c2063616e6e6f7420626520656d70747960501b6044820152606401610f30565b6001600160a01b038416611e9d5760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610f30565b6001600160a01b038316611ef35760405162461bcd60e51b815260206004820152601f60248201527f4f70657261746f722063616e6e6f74206265207a65726f2061646472657373006044820152606401610f30565b6000825111611f445760405162461bcd60e51b815260206004820152601960248201527f50726f706f736572732063616e6e6f7420626520656d707479000000000000006044820152606401610f30565b6000815111611b505760405162461bcd60e51b815260206004820152601960248201527f4578656375746f72732063616e6e6f7420626520656d707479000000000000006044820152606401610f30565b611f9d6123f5565b610e258484848461243e565b611fb16123f5565b611a8f828261257d565b611fc36123f5565b6118b6816125ce565b611fd46123f5565b565b611fde6123f5565b611fd4612640565b6000805160206138fe833981519152805461200c906001600160a01b031686308661266e565b61201684836126d5565b836001600160a01b0316856001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78585604051612064929190918252602082015260400190565b60405180910390a35050505050565b6000805160206138fe8339815191526001600160a01b03868116908516146120a0576120a0848784611b92565b6120aa848361270b565b80546120c0906001600160a01b03168685612741565b836001600160a01b0316856001600160a01b0316876001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8686604051612118929190918252602082015260400190565b60405180910390a4505050505050565b600081600381111561213c5761213c612f99565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b1480610bf457506301ffc9a760e01b6001600160e01b0319831614610bf4565b60008061218e868686612772565b905061219983612836565b80156121b55750600084806121b0576121b061370a565b868809115b15611591576121c56001826135f4565b9695505050505050565b6000805160206138be8339815191526001600160a01b0385166122085760405163e602df0560e01b815260006004820152602401610f30565b6001600160a01b03841661223257604051634a1406b160e11b815260006004820152602401610f30565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156122a757836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161206491815260200190565b5050505050565b6060826122c3576122be82612863565b610bf4565b5080610bf4565b6000805160206138be8339815191526001600160a01b03841661230657818160020160008282546122fb91906135f4565b909155506123659050565b6001600160a01b038416600090815260208290526040902054828110156123465784818460405163391434e360e21b8152600401610f309392919061343e565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b0383166123835760028101805483900390556123a2565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516123e791815260200190565b60405180910390a350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611fd457604051631afcd79f60e31b815260040160405180910390fd5b6124466123f5565b60008051602061389e833981519152612460600030611c3e565b506001600160a01b0382161561247d5761247b600083611c3e565b505b60005b84518110156124fa576124ba60008051602061391e8339815191528683815181106124ad576124ad61345f565b6020026020010151611c3e565b506124f17ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f7838683815181106124ad576124ad61345f565b50600101612480565b5060005b83518110156125345761252b60008051602061393e8339815191528583815181106124ad576124ad61345f565b506001016124fe565b50600181018590556040805160008152602081018790527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15050505050565b6125856123f5565b6000805160206138be8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036125bf8482613770565b5060048101610e258382613770565b6125d66123f5565b6000805160206138fe8339815191526000806125f18461288c565b9150915081612601576012612603565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b6126486123f5565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6040516001600160a01b038481166024830152838116604483015260648201839052610e259186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612968565b6001600160a01b0382166126ff5760405163ec442f0560e01b815260006004820152602401610f30565b611a8f600083836122ca565b6001600160a01b03821661273557604051634b637e8f60e11b815260006004820152602401610f30565b611a8f826000836122ca565b6040516001600160a01b03838116602483015260448201839052610eaf91859182169063a9059cbb906064016126a3565b60008383028160001985870982811083820303915050806000036127a95783828161279f5761279f61370a565b0492505050610dd7565b8084116127c95760405163227bc15360e01b815260040160405180910390fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6000600282600381111561284c5761284c612f99565b612856919061382f565b60ff166001149050919050565b8051156128735780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290516000918291829182916001600160a01b038716916128d39161385f565b600060405180830381855afa9150503d806000811461290e576040519150601f19603f3d011682016040523d82523d6000602084013e612913565b606091505b509150915081801561292757506020815110155b1561295b57600081806020019051810190612942919061339a565b905060ff8111612959576001969095509350505050565b505b5060009485945092505050565b600061297d6001600160a01b038416836129cb565b905080516000141580156129a25750808060200190518101906129a0919061387b565b155b15610eaf57604051635274afe760e01b81526001600160a01b0384166004820152602401610f30565b6060610dd78383600084600080856001600160a01b031684866040516129f1919061385f565b60006040518083038185875af1925050503d8060008114612a2e576040519150601f19603f3d011682016040523d82523d6000602084013e612a33565b606091505b50915091506121c5868383606082612a5357612a4e82612863565b610dd7565b8151158015612a6a57506001600160a01b0384163b155b15612a9357604051639996b31560e01b81526001600160a01b0385166004820152602401610f30565b5080610dd7565b6001600160a01b03811681146118b657600080fd5b8035612aba81612a9a565b919050565b60008083601f840112612ad157600080fd5b5081356001600160401b03811115612ae857600080fd5b602083019150836020828501011115612b0057600080fd5b9250929050565b600080600080600080600060c0888a031215612b2257600080fd5b8735612b2d81612a9a565b96506020880135955060408801356001600160401b03811115612b4f57600080fd5b612b5b8a828b01612abf565b989b979a50986060810135976080820135975060a09091013595509350505050565b600060208284031215612b8f57600080fd5b81356001600160e01b031981168114610dd757600080fd5b60005b83811015612bc2578181015183820152602001612baa565b50506000910152565b6020815260008251806020840152612bea816040850160208701612ba7565b601f01601f19169190910160400192915050565b600060208284031215612c1057600080fd5b5035919050565b60008060408385031215612c2a57600080fd5b8235612c3581612a9a565b946020939093013593505050565b60008060008060008060a08789031215612c5c57600080fd5b8635612c6781612a9a565b95506020870135945060408701356001600160401b03811115612c8957600080fd5b612c9589828a01612abf565b979a9699509760608101359660809091013595509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612cee57612cee612cb0565b604052919050565b600082601f830112612d0757600080fd5b81356001600160401b03811115612d2057612d20612cb0565b612d33601f8201601f1916602001612cc6565b818152846020838601011115612d4857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215612d7b57600080fd5b8435612d8681612a9a565b93506020850135612d9681612a9a565b92506040850135915060608501356001600160401b03811115612db857600080fd5b612dc487828801612cf6565b91505092959194509250565b600080600060608486031215612de557600080fd5b8335612df081612a9a565b92506020840135612e0081612a9a565b929592945050506040919091013590565b60008060408385031215612e2457600080fd5b823591506020830135612e3681612a9a565b809150509250929050565b600060208284031215612e5357600080fd5b8135610dd781612a9a565b60008083601f840112612e7057600080fd5b5081356001600160401b03811115612e8757600080fd5b6020830191508360208260051b8501011115612b0057600080fd5b6000806000806000806000806000806101008b8d031215612ec257600080fd5b612ecb8b612aaf565b995060208b01356001600160401b0380821115612ee757600080fd5b612ef38e838f01612cf6565b9a5060408d0135915080821115612f0957600080fd5b612f158e838f01612cf6565b9950612f2360608e01612aaf565b9850612f3160808e01612aaf565b975060a08d0135965060c08d0135915080821115612f4e57600080fd5b612f5a8e838f01612e5e565b909650945060e08d0135915080821115612f7357600080fd5b50612f808d828e01612e5e565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612fd157634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600080600080600060c08a8c031215612ff557600080fd5b89356001600160401b038082111561300c57600080fd5b6130188d838e01612e5e565b909b50995060208c013591508082111561303157600080fd5b61303d8d838e01612e5e565b909950975060408c013591508082111561305657600080fd5b506130638c828d01612e5e565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156130a457600080fd5b88356001600160401b03808211156130bb57600080fd5b6130c78c838d01612e5e565b909a50985060208b01359150808211156130e057600080fd5b6130ec8c838d01612e5e565b909850965060408b013591508082111561310557600080fd5b506131128b828c01612e5e565b999c989b509699959896976060870135966080013595509350505050565b60008060006060848603121561314557600080fd5b83359250602084013561315781612a9a565b9150604084013561316781612a9a565b809150509250925092565b600082601f83011261318357600080fd5b813560206001600160401b0382111561319e5761319e612cb0565b8160051b6131ad828201612cc6565b92835284810182019282810190878511156131c757600080fd5b83870192505b848310156131e6578235825291830191908301906131cd565b979650505050505050565b600080600080600060a0868803121561320957600080fd5b853561321481612a9a565b9450602086013561322481612a9a565b935060408601356001600160401b038082111561324057600080fd5b61324c89838a01613172565b9450606088013591508082111561326257600080fd5b61326e89838a01613172565b9350608088013591508082111561328457600080fd5b5061329188828901612cf6565b9150509295509295909350565b600080604083850312156132b157600080fd5b82356132bc81612a9a565b91506020830135612e3681612a9a565b600080600080600060a086880312156132e457600080fd5b85356132ef81612a9a565b945060208601356132ff81612a9a565b9350604086013592506060860135915060808601356001600160401b0381111561332857600080fd5b61329188828901612cf6565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a06040820152600061338560a083018688613334565b60608301949094525060800152949350505050565b6000602082840312156133ac57600080fd5b5051919050565b600181811c908216806133c757607f821691505b60208210810361128c57634e487b7160e01b600052602260045260246000fd5b60018060a01b03851681528360208201526060604082015260006121c5606083018486613334565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115610bf457610bf461340f565b6001600160a01b039390931683526020830191909152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261348c57600080fd5b8301803591506001600160401b038211156134a657600080fd5b602001915036819003821315612b0057600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561354457848303601f19018952813536889003601e190181126134fb57600080fd5b870184810190356001600160401b0381111561351657600080fd5b80360382131561352557600080fd5b613530858284613334565b9a86019a94505050908301906001016134d5565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b81101561359457823561357781612a9a565b6001600160a01b0316825260209283019290910190600101613564565b5083810360208501528881526001600160fb1b038911156135b457600080fd5b8860051b9150818a602083013701828103602090810160408501526135dc90820187896134bb565b60608401959095525050608001529695505050505050565b80820180821115610bf457610bf461340f565b600181815b808511156136425781600019048211156136285761362861340f565b8085161561363557918102915b93841c939080029061360c565b509250929050565b60008261365957506001610bf4565b8161366657506000610bf4565b816001811461367c5760028114613686576136a2565b6001915050610bf4565b60ff8411156136975761369761340f565b50506001821b610bf4565b5060208310610133831016604e8410600b84101617156136c5575081810a610bf4565b6136cf8383613607565b80600019048211156136e3576136e361340f565b029392505050565b6000610dd760ff84168361364a565b8183823760009101908152919050565b634e487b7160e01b600052601260045260246000fd5b601f821115610eaf576000816000526020600020601f850160051c810160208610156137495750805b601f850160051c820191505b8181101561376857828155600101613755565b505050505050565b81516001600160401b0381111561378957613789612cb0565b61379d8161379784546133b3565b84613720565b602080601f8311600181146137d257600084156137ba5750858301515b600019600386901b1c1916600185901b178555613768565b600085815260208120601f198616915b82811015613801578886015182559484019460019091019084016137e2565b508582101561381f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060ff83168061385057634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60008251613871818460208701612ba7565b9190910192915050565b60006020828403121561388d57600080fd5b81518015158114610dd757600080fdfe9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268000773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a2646970667358221220a4ca2934dc0a810c8c2c45b83a7d4c9795552aeabd4bf7bb55e6d5133d4a1ead64736f6c63430008180033", + "nonce": "0x1ca", + "chainId": "0x4268" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionType": "CREATE", + "contractName": "VaultFactory", + "contractAddress": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "function": null, + "arguments": [ + "0xb04CB6c52E73CF3e2753776030CE85a36549c9C2", + "[0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913, 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39]", + "[0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913, 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39]", + "10", + "0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913" + ], + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x4ecbf1", + "value": "0x0", + "input": "0x60806040523480156200001157600080fd5b50604051620047ff380380620047ff8339810160408190526200003491620002ea565b6200004160008262000117565b50818484836040516200005490620001eb565b620000639493929190620003cb565b604051809103906000f08015801562000080573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03929092169182179055604051620000ae90620001f9565b6001600160a01b039091168152602001604051809103906000f080158015620000db573d6000803e3d6000fd5b50600080546001600160a01b039283166001600160a01b0319918216179091556002805497909216961695909517909455506200041492505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16620001df576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055620001943390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050620001e5565b60009150505b92915050565b611e1480620024c783390190565b61052480620042db83390190565b80516001600160a01b03811681146200021f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024c57600080fd5b815160206001600160401b03808311156200026b576200026b62000224565b8260051b604051601f19603f8301168101818110848211171562000293576200029362000224565b6040529384526020818701810194908101925087851115620002b457600080fd5b6020870191505b84821015620002df57620002cf8262000207565b83529183019190830190620002bb565b979650505050505050565b600080600080600060a086880312156200030357600080fd5b6200030e8662000207565b60208701519095506001600160401b03808211156200032c57600080fd5b6200033a89838a016200023a565b955060408801519150808211156200035157600080fd5b5062000360888289016200023a565b93505060608601519150620003786080870162000207565b90509295509295909350565b60008151808452602080850194506020840160005b83811015620003c05781516001600160a01b03168752958201959082019060010162000399565b509495945050505050565b848152608060208201526000620003e6608083018662000384565b8281036040840152620003fa818662000384565b91505060018060a01b038316606083015295945050505050565b6120a380620004246000396000f3fe60806040523480156200001157600080fd5b5060043610620001095760003560e01c8063578b04b611620000a3578063a217fddf116200006e578063a217fddf1462000273578063d33219b4146200027c578063d547741f1462000290578063df6691c914620002a757600080fd5b8063578b04b6146200021a5780636c32c01a14620002315780636f4e9f18146200024857806391d14854146200025c57600080fd5b80632f2ff15d11620000e45780632f2ff15d146200018957806336568abe14620001a25780633e47158c14620001b957806354fd4d5014620001e657600080fd5b806301ffc9a7146200010e57806311b6f8e6146200013a578063248a9ca31462000163575b600080fd5b620001256200011f36600462000a1d565b620002bb565b60405190151581526020015b60405180910390f35b620001516200014b36600462000b11565b620002f3565b60405162000131949392919062000bdf565b6200017a6200017436600462000c34565b62000454565b60405190815260200162000131565b620001a06200019a36600462000c76565b62000477565b005b620001a0620001b336600462000c76565b6200049f565b600054620001cd906001600160a01b031681565b6040516001600160a01b03909116815260200162000131565b6200020b604051806040016040528060058152602001640302e312e360dc1b81525081565b60405162000131919062000ca9565b620001a06200022b36600462000cbe565b620004da565b620001cd6200024236600462000d88565b620005b4565b600254620001cd906001600160a01b031681565b620001256200026d36600462000c76565b62000834565b6200017a600081565b600154620001cd906001600160a01b031681565b620001a0620002a136600462000c76565b6200086d565b600354620001cd906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b1480620002ed57506301ffc9a760e01b6001600160e01b03198316145b92915050565b8051602081830181018051600482529282019190930120915280546001820180546001600160a01b0390921692916200032c9062000e84565b80601f01602080910402602001604051908101604052809291908181526020018280546200035a9062000e84565b8015620003ab5780601f106200037f57610100808354040283529160200191620003ab565b820191906000526020600020905b8154815290600101906020018083116200038d57829003601f168201915b505050505090806002018054620003c29062000e84565b80601f0160208091040260200160405190810160405280929190818152602001828054620003f09062000e84565b8015620004415780601f10620004155761010080835404028352916020019162000441565b820191906000526020600020905b8154815290600101906020018083116200042357829003601f168201915b5050506003909301549192505060ff1684565b60009081526000805160206200204e833981519152602052604090206001015490565b620004828262000454565b6200048d816200088f565b6200049983836200089e565b50505050565b6001600160a01b0381163314620004c95760405163334bd91960e11b815260040160405180910390fd5b620004d582826200094a565b505050565b6000620004e7816200088f565b6001600160a01b0383166200050f5760405163d92e233d60e01b815260040160405180910390fd5b600082600181111562000526576200052662000ba6565b146200054e57600380546001600160a01b0319166001600160a01b038516179055826200056b565b600280546001600160a01b0319166001600160a01b038516179055825b50826001600160a01b03167f4012f0d4c2e46377c360faa001a6ecb880f68c61337bd2d4785233740ba1315383604051620005a7919062000ec0565b60405180910390a2505050565b600080620005c2816200088f565b60006001600160a01b0316600489604051620005df919062000ed0565b908152604051908190036020019020546001600160a01b0316146200061757604051631f626a8d60e21b815260040160405180910390fd5b60006040518060800160405280604d815260200162002001604d913990506000600260009054906101000a90046001600160a01b031660008054906101000a90046001600160a01b0316838e8e8e8e8e8e8e8e6040516024016200068398979695949392919062000f35565b60408051601f198184030181529082905291620006a09162000ed0565b60408051918290039091206020830180516001600160e01b03166001600160e01b031990921691909117905251620006d89062000a0f565b620006e69392919062000fc5565b604051809103906000f08015801562000703573d6000803e3d6000fd5b5090506040518060800160405280826001600160a01b031681526020018c81526020018b81526020016000600181111562000742576200074262000ba6565b81525060048b60405162000757919062000ed0565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b0390911617815590820151600182019062000798908262001047565b5060408201516002820190620007af908262001047565b50606082015160038201805460ff191660018381811115620007d557620007d562000ba6565b0217905550905050806001600160a01b03167fe90180b6ad74de4a220e5b6a56966ddfeb451c01b2abebdb67ca4f9458584a428c8c60006040516200081d9392919062001114565b60405180910390a29b9a5050505050505050505050565b60009182526000805160206200204e833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b620008788262000454565b62000883816200088f565b6200049983836200094a565b6200089b8133620009cb565b50565b60006000805160206200204e833981519152620008bc848462000834565b6200093f576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055620008f43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050620002ed565b6000915050620002ed565b60006000805160206200204e83398151915262000968848462000834565b156200093f576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050620002ed565b620009d7828262000834565b62000a0b5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b610eb1806200115083390190565b60006020828403121562000a3057600080fd5b81356001600160e01b03198116811462000a4957600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562000a925762000a9262000a50565b604052919050565b600082601f83011262000aac57600080fd5b813567ffffffffffffffff81111562000ac95762000ac962000a50565b62000ade601f8201601f191660200162000a66565b81815284602083860101111562000af457600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121562000b2457600080fd5b813567ffffffffffffffff81111562000b3c57600080fd5b62000b4a8482850162000a9a565b949350505050565b60005b8381101562000b6f57818101518382015260200162000b55565b50506000910152565b6000815180845262000b9281602086016020860162000b52565b601f01601f19169290920160200192915050565b634e487b7160e01b600052602160045260246000fd5b6002811062000bdb57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038516815260806020820181905260009062000c059083018662000b78565b828103604084015262000c19818662000b78565b91505062000c2b606083018462000bbc565b95945050505050565b60006020828403121562000c4757600080fd5b5035919050565b6001600160a01b03811681146200089b57600080fd5b803562000c718162000c4e565b919050565b6000806040838503121562000c8a57600080fd5b82359150602083013562000c9e8162000c4e565b809150509250929050565b60208152600062000a49602083018462000b78565b6000806040838503121562000cd257600080fd5b823562000cdf8162000c4e565b915060208301356002811062000c9e57600080fd5b600082601f83011262000d0657600080fd5b8135602067ffffffffffffffff82111562000d255762000d2562000a50565b8160051b62000d3682820162000a66565b928352848101820192828101908785111562000d5157600080fd5b83870192505b8483101562000d7d57823562000d6d8162000c4e565b8252918301919083019062000d57565b979650505050505050565b600080600080600080600080610100898b03121562000da657600080fd5b62000db18962000c64565b9750602089013567ffffffffffffffff8082111562000dcf57600080fd5b62000ddd8c838d0162000a9a565b985060408b013591508082111562000df457600080fd5b62000e028c838d0162000a9a565b975062000e1260608c0162000c64565b965062000e2260808c0162000c64565b955060a08b0135945060c08b013591508082111562000e4057600080fd5b62000e4e8c838d0162000cf4565b935060e08b013591508082111562000e6557600080fd5b5062000e748b828c0162000cf4565b9150509295985092959890939650565b600181811c9082168062000e9957607f821691505b60208210810362000eba57634e487b7160e01b600052602260045260246000fd5b50919050565b60208101620002ed828462000bbc565b6000825162000ee481846020870162000b52565b9190910192915050565b60008151808452602080850194506020840160005b8381101562000f2a5781516001600160a01b03168752958201959082019060010162000f03565b509495945050505050565b6001600160a01b0389811682526101006020830181905260009162000f5d8483018c62000b78565b9150838203604085015262000f73828b62000b78565b915080891660608501528088166080850152508560a084015282810360c084015262000fa0818662000eee565b905082810360e084015262000fb6818562000eee565b9b9a5050505050505050505050565b6001600160a01b0384811682528316602082015260606040820181905260009062000c2b9083018462000b78565b601f821115620004d5576000816000526020600020601f850160051c810160208610156200101e5750805b601f850160051c820191505b818110156200103f578281556001016200102a565b505050505050565b815167ffffffffffffffff81111562001064576200106462000a50565b6200107c8162001075845462000e84565b8462000ff3565b602080601f831160018114620010b457600084156200109b5750858301515b600019600386901b1c1916600185901b1785556200103f565b600085815260208120601f198616915b82811015620010e557888601518255948401946001909101908401620010c4565b5085821015620011045787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60608152600062001129606083018662000b78565b82810360208401526200113d818662000b78565b91505062000b4a604083018462000bbc56fe60a060405260405162000eb138038062000eb18339810160408190526200002691620003cd565b82816200003482826200009c565b505081604051620000459062000366565b6001600160a01b039091168152602001604051809103906000f08015801562000072573d6000803e3d6000fd5b506001600160a01b0316608052620000936200008d60805190565b62000102565b505050620004cb565b620000a78262000174565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115620000f457620000ef8282620001f4565b505050565b620000fe62000271565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014460008051602062000e91833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620001718162000293565b50565b806001600160a01b03163b600003620001b057604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080846001600160a01b031684604051620002139190620004ad565b600060405180830381855af49150503d806000811462000250576040519150601f19603f3d011682016040523d82523d6000602084013e62000255565b606091505b50909250905062000268858383620002d6565b95945050505050565b3415620002915760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b038116620002bf57604051633173bdd160e11b815260006004820152602401620001a7565b8060008051602062000e91833981519152620001d3565b606082620002ef57620002e9826200033c565b62000335565b81511580156200030757506001600160a01b0384163b155b156200033257604051639996b31560e01b81526001600160a01b0385166004820152602401620001a7565b50805b9392505050565b8051156200034d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b610524806200096d83390190565b80516001600160a01b03811681146200038c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003c4578181015183820152602001620003aa565b50506000910152565b600080600060608486031215620003e357600080fd5b620003ee8462000374565b9250620003fe6020850162000374565b60408501519092506001600160401b03808211156200041c57600080fd5b818601915086601f8301126200043157600080fd5b81518181111562000446576200044662000391565b604051601f8201601f19908116603f0116810190838211818310171562000471576200047162000391565b816040528281528960208487010111156200048b57600080fd5b6200049e836020830160208801620003a7565b80955050505050509250925092565b60008251620004c1818460208701620003a7565b9190910192915050565b608051610487620004e66000396000601001526104876000f3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007b576000356001600160e01b03191663278f794360e11b14610071576040516334ad5dbb60e21b815260040160405180910390fd5b610079610083565b565b6100796100b2565b6000806100933660048184610312565b8101906100a09190610352565b915091506100ae82826100c2565b5050565b6100796100bd61011d565b610155565b6100cb82610179565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156101155761011082826101f5565b505050565b6100ae61026b565b60006101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610174573d6000f35b3d6000fd5b806001600160a01b03163b6000036101b457604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102129190610422565b600060405180830381855af49150503d806000811461024d576040519150601f19603f3d011682016040523d82523d6000602084013e610252565b606091505b509150915061026285838361028a565b95945050505050565b34156100795760405163b398979f60e01b815260040160405180910390fd5b60608261029f5761029a826102e9565b6102e2565b81511580156102b657506001600160a01b0384163b155b156102df57604051639996b31560e01b81526001600160a01b03851660048201526024016101ab565b50805b9392505050565b8051156102f95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000808585111561032257600080fd5b8386111561032f57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561036557600080fd5b82356001600160a01b038116811461037c57600080fd5b9150602083013567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bf576103bf61033c565b604051601f8201601f19908116603f011681019083821181831017156103e7576103e761033c565b8160405282815288602084870101111561040057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b818110156104435760208186018101518583015201610429565b50600092019182525091905056fea26469706673582212209b91e8f79233c9ec74731835b923ca2476176adaf296c3866c220f3be4bfb69f64736f6c63430008180033608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c63430008180033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103696e697469616c697a6528616464726573732c737472696e672c737472696e672c616464726573732c616464726573732c75696e743235362c616464726573735b5d2c616464726573735b5d2902dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212200351cafa75c1d9253e6c87472a1180263b8448d685ed912bf7808a32eba7416964736f6c6343000818003360806040523480156200001157600080fd5b5060405162001e1438038062001e1483398101604081905262000034916200032f565b620000416000306200019d565b506001600160a01b0381161562000061576200005f6000826200019d565b505b60005b83518110156200010157620000bc7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1858381518110620000a857620000a8620003b6565b60200260200101516200019d60201b60201c565b50620000f77ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783858381518110620000a857620000a8620003b6565b5060010162000064565b5060005b82518110156200015357620001497fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63848381518110620000a857620000a8620003b6565b5060010162000105565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620003cc565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000242576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001f93390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000246565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200027a57600080fd5b919050565b600082601f8301126200029157600080fd5b815160206001600160401b0380831115620002b057620002b06200024c565b8260051b604051601f19603f83011681018181108482111715620002d857620002d86200024c565b6040529384526020818701810194908101925087851115620002f957600080fd5b6020870191505b848210156200032457620003148262000262565b8352918301919083019062000300565b979650505050505050565b600080600080608085870312156200034657600080fd5b845160208601519094506001600160401b03808211156200036657600080fd5b62000374888389016200027f565b945060408701519150808211156200038b57600080fd5b506200039a878288016200027f565b925050620003ab6060860162000262565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b611a3880620003dc6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f1461056a578063e38335e51461058a578063f23a6e611461059d578063f27a0c92146105c957600080fd5b8063bc197c81146104f1578063c4d252f51461051d578063d45c44351461053d57600080fd5b806391d14854116100c657806391d1485414610468578063a217fddf14610488578063b08e51c01461049d578063b1c5f427146104d157600080fd5b80638065657f146103f45780638f2a0bb0146104145780638f61f4f51461043457600080fd5b80632ab0f5291161015957806336568abe1161013357806336568abe14610367578063584b153e1461038757806364d62353146103a75780637958004c146103c757600080fd5b80632ab0f529146103075780632f2ff15d1461032757806331d507501461034757600080fd5b8063134008d311610195578063134008d31461026057806313bc9f2014610273578063150b7a0214610293578063248a9ca3146102d757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e23660046111ba565b6105de565b005b3480156101f557600080fd5b5061020961020436600461122e565b6106b4565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b6101e761026e366004611258565b6106c5565b34801561027f57600080fd5b5061020961028e3660046112c3565b61077a565b34801561029f57600080fd5b506102be6102ae366004611391565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b3480156102e357600080fd5b506102526102f23660046112c3565b60009081526020819052604090206001015490565b34801561031357600080fd5b506102096103223660046112c3565b6107a0565b34801561033357600080fd5b506101e76103423660046113f8565b6107a9565b34801561035357600080fd5b506102096103623660046112c3565b6107d4565b34801561037357600080fd5b506101e76103823660046113f8565b6107f9565b34801561039357600080fd5b506102096103a23660046112c3565b610831565b3480156103b357600080fd5b506101e76103c23660046112c3565b610877565b3480156103d357600080fd5b506103e76103e23660046112c3565b6108ea565b604051610215919061143a565b34801561040057600080fd5b5061025261040f366004611258565b610935565b34801561042057600080fd5b506101e761042f3660046114a6565b610974565b34801561044057600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561047457600080fd5b506102096104833660046113f8565b610b02565b34801561049457600080fd5b50610252600081565b3480156104a957600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104dd57600080fd5b506102526104ec366004611557565b610b2b565b3480156104fd57600080fd5b506102be61050c36600461167e565b63bc197c8160e01b95945050505050565b34801561052957600080fd5b506101e76105383660046112c3565b610b70565b34801561054957600080fd5b506102526105583660046112c3565b60009081526001602052604090205490565b34801561057657600080fd5b506101e76105853660046113f8565b610c1b565b6101e7610598366004611557565b610c40565b3480156105a957600080fd5b506102be6105b8366004611727565b63f23a6e6160e01b95945050505050565b3480156105d557600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161060881610dc7565b6000610618898989898989610935565b90506106248184610dd4565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610660969594939291906117b4565b60405180910390a383156106a957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a091815260200190565b60405180910390a25b505050505050505050565b60006106bf82610e68565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106f1816000610b02565b6106ff576106ff8133610e8d565b600061070f888888888888610935565b905061071b8185610eca565b61072788888888610f18565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161075f94939291906117f1565b60405180910390a361077081610f90565b5050505050505050565b600060025b610788836108ea565b600381111561079957610799611424565b1492915050565b6000600361077f565b6000828152602081905260409020600101546107c481610dc7565b6107ce8383610fbc565b50505050565b6000806107e0836108ea565b60038111156107f1576107f1611424565b141592915050565b6001600160a01b03811633146108225760405163334bd91960e11b815260040160405180910390fd5b61082c828261104e565b505050565b60008061083d836108ea565b9050600181600381111561085357610853611424565b14806108705750600281600381111561086e5761086e611424565b145b9392505050565b333081146108a85760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b6000818152600160205260408120548060000361090a5750600092915050565b6001810361091b5750600392915050565b4281111561092c5750600192915050565b50600292915050565b6000868686868686604051602001610952969594939291906117b4565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161099e81610dc7565b88871415806109ad5750888514155b156109df576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161089f565b60006109f18b8b8b8b8b8b8b8b610b2b565b90506109fd8184610dd4565b60005b8a811015610ab35780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a3d57610a3d611823565b9050602002016020810190610a529190611839565b8d8d86818110610a6457610a64611823565b905060200201358c8c87818110610a7d57610a7d611823565b9050602002810190610a8f9190611854565b8c8b604051610aa3969594939291906117b4565b60405180910390a3600101610a00565b508315610af557807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610aec91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b4c989796959493929190611930565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b9a81610dc7565b610ba382610831565b610bdf5781610bb260026110b9565b610bbc60016110b9565b604051635ead8eb560e01b8152600481019390935217602482015260440161089f565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c3681610dc7565b6107ce838361104e565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c6c816000610b02565b610c7a57610c7a8133610e8d565b8786141580610c895750878414155b15610cbb576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161089f565b6000610ccd8a8a8a8a8a8a8a8a610b2b565b9050610cd98185610eca565b60005b89811015610db15760008b8b83818110610cf857610cf8611823565b9050602002016020810190610d0d9190611839565b905060008a8a84818110610d2357610d23611823565b9050602002013590503660008a8a86818110610d4157610d41611823565b9050602002810190610d539190611854565b91509150610d6384848484610f18565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d9a94939291906117f1565b60405180910390a350505050806001019050610cdc565b50610dbb81610f90565b50505050505050505050565b610dd18133610e8d565b50565b610ddd826107d4565b15610e0f5781610ded60006110b9565b604051635ead8eb560e01b81526004810192909252602482015260440161089f565b6000610e1a60025490565b905080821015610e4757604051635433660960e01b8152600481018390526024810182905260440161089f565b610e5182426119d1565b600093845260016020526040909320929092555050565b60006001600160e01b03198216630271189760e51b14806106bf57506106bf826110dc565b610e978282610b02565b610ec65760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161089f565b5050565b610ed38261077a565b610ee25781610ded60026110b9565b8015801590610ef75750610ef5816107a0565b155b15610ec65760405163121534c360e31b81526004810182905260240161089f565b600080856001600160a01b0316858585604051610f369291906119f2565b60006040518083038185875af1925050503d8060008114610f73576040519150601f19603f3d011682016040523d82523d6000602084013e610f78565b606091505b5091509150610f878282611111565b50505050505050565b610f998161077a565b610fa85780610ded60026110b9565b600090815260016020819052604090912055565b6000610fc88383610b02565b611046576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610ffe3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bf565b5060006106bf565b600061105a8383610b02565b15611046576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bf565b60008160038111156110cd576110cd611424565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b14806106bf57506301ffc9a760e01b6001600160e01b03198316146106bf565b606082611126576111218261112d565b6106bf565b50806106bf565b80511561113d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461116d57600080fd5b919050565b60008083601f84011261118457600080fd5b5081356001600160401b0381111561119b57600080fd5b6020830191508360208285010111156111b357600080fd5b9250929050565b600080600080600080600060c0888a0312156111d557600080fd5b6111de88611156565b96506020880135955060408801356001600160401b0381111561120057600080fd5b61120c8a828b01611172565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561124057600080fd5b81356001600160e01b03198116811461087057600080fd5b60008060008060008060a0878903121561127157600080fd5b61127a87611156565b95506020870135945060408701356001600160401b0381111561129c57600080fd5b6112a889828a01611172565b979a9699509760608101359660809091013595509350505050565b6000602082840312156112d557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561131a5761131a6112dc565b604052919050565b600082601f83011261133357600080fd5b81356001600160401b0381111561134c5761134c6112dc565b61135f601f8201601f19166020016112f2565b81815284602083860101111561137457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113a757600080fd5b6113b085611156565b93506113be60208601611156565b92506040850135915060608501356001600160401b038111156113e057600080fd5b6113ec87828801611322565b91505092959194509250565b6000806040838503121561140b57600080fd5b8235915061141b60208401611156565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061145c57634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f84011261147457600080fd5b5081356001600160401b0381111561148b57600080fd5b6020830191508360208260051b85010111156111b357600080fd5b600080600080600080600080600060c08a8c0312156114c457600080fd5b89356001600160401b03808211156114db57600080fd5b6114e78d838e01611462565b909b50995060208c013591508082111561150057600080fd5b61150c8d838e01611462565b909950975060408c013591508082111561152557600080fd5b506115328c828d01611462565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561157357600080fd5b88356001600160401b038082111561158a57600080fd5b6115968c838d01611462565b909a50985060208b01359150808211156115af57600080fd5b6115bb8c838d01611462565b909850965060408b01359150808211156115d457600080fd5b506115e18b828c01611462565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261161057600080fd5b813560206001600160401b0382111561162b5761162b6112dc565b8160051b61163a8282016112f2565b928352848101820192828101908785111561165457600080fd5b83870192505b848310156116735782358252918301919083019061165a565b979650505050505050565b600080600080600060a0868803121561169657600080fd5b61169f86611156565b94506116ad60208701611156565b935060408601356001600160401b03808211156116c957600080fd5b6116d589838a016115ff565b945060608801359150808211156116eb57600080fd5b6116f789838a016115ff565b9350608088013591508082111561170d57600080fd5b5061171a88828901611322565b9150509295509295909350565b600080600080600060a0868803121561173f57600080fd5b61174886611156565b945061175660208701611156565b9350604086013592506060860135915060808601356001600160401b0381111561177f57600080fd5b61171a88828901611322565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a0604082015260006117dc60a08301868861178b565b60608301949094525060800152949350505050565b60018060a01b038516815283602082015260606040820152600061181960608301848661178b565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561184b57600080fd5b61087082611156565b6000808335601e1984360301811261186b57600080fd5b8301803591506001600160401b0382111561188557600080fd5b6020019150368190038213156111b357600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561192357848303601f19018952813536889003601e190181126118da57600080fd5b870184810190356001600160401b038111156118f557600080fd5b80360382131561190457600080fd5b61190f85828461178b565b9a86019a94505050908301906001016118b4565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b811015611971576001600160a01b0361195c84611156565b16825260209283019290910190600101611943565b5083810360208501528881526001600160fb1b0389111561199157600080fd5b8860051b9150818a602083013701828103602090810160408501526119b9908201878961189a565b60608401959095525050608001529695505050505050565b808201808211156106bf57634e487b7160e01b600052601160045260246000fd5b818382376000910190815291905056fea2646970667358221220d82d80986c3afa2dc55fdf8ff5c77f0b1f8dcd17e320484434a202763974ab0a64736f6c63430008180033608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c63430008180033000000000000000000000000b04cb6c52e73cf3e2753776030ce85a36549c9c200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d390000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "nonce": "0x1cb", + "chainId": "0x4268" + }, + "additionalContracts": [ + { + "transactionType": "CREATE", + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "initCode": "0x60806040523480156200001157600080fd5b5060405162001e1438038062001e1483398101604081905262000034916200032f565b620000416000306200019d565b506001600160a01b0381161562000061576200005f6000826200019d565b505b60005b83518110156200010157620000bc7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1858381518110620000a857620000a8620003b6565b60200260200101516200019d60201b60201c565b50620000f77ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783858381518110620000a857620000a8620003b6565b5060010162000064565b5060005b82518110156200015357620001497fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63848381518110620000a857620000a8620003b6565b5060010162000105565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620003cc565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000242576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001f93390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000246565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200027a57600080fd5b919050565b600082601f8301126200029157600080fd5b815160206001600160401b0380831115620002b057620002b06200024c565b8260051b604051601f19603f83011681018181108482111715620002d857620002d86200024c565b6040529384526020818701810194908101925087851115620002f957600080fd5b6020870191505b848210156200032457620003148262000262565b8352918301919083019062000300565b979650505050505050565b600080600080608085870312156200034657600080fd5b845160208601519094506001600160401b03808211156200036657600080fd5b62000374888389016200027f565b945060408701519150808211156200038b57600080fd5b506200039a878288016200027f565b925050620003ab6060860162000262565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b611a3880620003dc6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f1461056a578063e38335e51461058a578063f23a6e611461059d578063f27a0c92146105c957600080fd5b8063bc197c81146104f1578063c4d252f51461051d578063d45c44351461053d57600080fd5b806391d14854116100c657806391d1485414610468578063a217fddf14610488578063b08e51c01461049d578063b1c5f427146104d157600080fd5b80638065657f146103f45780638f2a0bb0146104145780638f61f4f51461043457600080fd5b80632ab0f5291161015957806336568abe1161013357806336568abe14610367578063584b153e1461038757806364d62353146103a75780637958004c146103c757600080fd5b80632ab0f529146103075780632f2ff15d1461032757806331d507501461034757600080fd5b8063134008d311610195578063134008d31461026057806313bc9f2014610273578063150b7a0214610293578063248a9ca3146102d757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e23660046111ba565b6105de565b005b3480156101f557600080fd5b5061020961020436600461122e565b6106b4565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b6101e761026e366004611258565b6106c5565b34801561027f57600080fd5b5061020961028e3660046112c3565b61077a565b34801561029f57600080fd5b506102be6102ae366004611391565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b3480156102e357600080fd5b506102526102f23660046112c3565b60009081526020819052604090206001015490565b34801561031357600080fd5b506102096103223660046112c3565b6107a0565b34801561033357600080fd5b506101e76103423660046113f8565b6107a9565b34801561035357600080fd5b506102096103623660046112c3565b6107d4565b34801561037357600080fd5b506101e76103823660046113f8565b6107f9565b34801561039357600080fd5b506102096103a23660046112c3565b610831565b3480156103b357600080fd5b506101e76103c23660046112c3565b610877565b3480156103d357600080fd5b506103e76103e23660046112c3565b6108ea565b604051610215919061143a565b34801561040057600080fd5b5061025261040f366004611258565b610935565b34801561042057600080fd5b506101e761042f3660046114a6565b610974565b34801561044057600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561047457600080fd5b506102096104833660046113f8565b610b02565b34801561049457600080fd5b50610252600081565b3480156104a957600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104dd57600080fd5b506102526104ec366004611557565b610b2b565b3480156104fd57600080fd5b506102be61050c36600461167e565b63bc197c8160e01b95945050505050565b34801561052957600080fd5b506101e76105383660046112c3565b610b70565b34801561054957600080fd5b506102526105583660046112c3565b60009081526001602052604090205490565b34801561057657600080fd5b506101e76105853660046113f8565b610c1b565b6101e7610598366004611557565b610c40565b3480156105a957600080fd5b506102be6105b8366004611727565b63f23a6e6160e01b95945050505050565b3480156105d557600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161060881610dc7565b6000610618898989898989610935565b90506106248184610dd4565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610660969594939291906117b4565b60405180910390a383156106a957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a091815260200190565b60405180910390a25b505050505050505050565b60006106bf82610e68565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106f1816000610b02565b6106ff576106ff8133610e8d565b600061070f888888888888610935565b905061071b8185610eca565b61072788888888610f18565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161075f94939291906117f1565b60405180910390a361077081610f90565b5050505050505050565b600060025b610788836108ea565b600381111561079957610799611424565b1492915050565b6000600361077f565b6000828152602081905260409020600101546107c481610dc7565b6107ce8383610fbc565b50505050565b6000806107e0836108ea565b60038111156107f1576107f1611424565b141592915050565b6001600160a01b03811633146108225760405163334bd91960e11b815260040160405180910390fd5b61082c828261104e565b505050565b60008061083d836108ea565b9050600181600381111561085357610853611424565b14806108705750600281600381111561086e5761086e611424565b145b9392505050565b333081146108a85760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b6000818152600160205260408120548060000361090a5750600092915050565b6001810361091b5750600392915050565b4281111561092c5750600192915050565b50600292915050565b6000868686868686604051602001610952969594939291906117b4565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161099e81610dc7565b88871415806109ad5750888514155b156109df576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161089f565b60006109f18b8b8b8b8b8b8b8b610b2b565b90506109fd8184610dd4565b60005b8a811015610ab35780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a3d57610a3d611823565b9050602002016020810190610a529190611839565b8d8d86818110610a6457610a64611823565b905060200201358c8c87818110610a7d57610a7d611823565b9050602002810190610a8f9190611854565b8c8b604051610aa3969594939291906117b4565b60405180910390a3600101610a00565b508315610af557807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610aec91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b4c989796959493929190611930565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b9a81610dc7565b610ba382610831565b610bdf5781610bb260026110b9565b610bbc60016110b9565b604051635ead8eb560e01b8152600481019390935217602482015260440161089f565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c3681610dc7565b6107ce838361104e565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c6c816000610b02565b610c7a57610c7a8133610e8d565b8786141580610c895750878414155b15610cbb576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161089f565b6000610ccd8a8a8a8a8a8a8a8a610b2b565b9050610cd98185610eca565b60005b89811015610db15760008b8b83818110610cf857610cf8611823565b9050602002016020810190610d0d9190611839565b905060008a8a84818110610d2357610d23611823565b9050602002013590503660008a8a86818110610d4157610d41611823565b9050602002810190610d539190611854565b91509150610d6384848484610f18565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d9a94939291906117f1565b60405180910390a350505050806001019050610cdc565b50610dbb81610f90565b50505050505050505050565b610dd18133610e8d565b50565b610ddd826107d4565b15610e0f5781610ded60006110b9565b604051635ead8eb560e01b81526004810192909252602482015260440161089f565b6000610e1a60025490565b905080821015610e4757604051635433660960e01b8152600481018390526024810182905260440161089f565b610e5182426119d1565b600093845260016020526040909320929092555050565b60006001600160e01b03198216630271189760e51b14806106bf57506106bf826110dc565b610e978282610b02565b610ec65760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161089f565b5050565b610ed38261077a565b610ee25781610ded60026110b9565b8015801590610ef75750610ef5816107a0565b155b15610ec65760405163121534c360e31b81526004810182905260240161089f565b600080856001600160a01b0316858585604051610f369291906119f2565b60006040518083038185875af1925050503d8060008114610f73576040519150601f19603f3d011682016040523d82523d6000602084013e610f78565b606091505b5091509150610f878282611111565b50505050505050565b610f998161077a565b610fa85780610ded60026110b9565b600090815260016020819052604090912055565b6000610fc88383610b02565b611046576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610ffe3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bf565b5060006106bf565b600061105a8383610b02565b15611046576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bf565b60008160038111156110cd576110cd611424565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b14806106bf57506301ffc9a760e01b6001600160e01b03198316146106bf565b606082611126576111218261112d565b6106bf565b50806106bf565b80511561113d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461116d57600080fd5b919050565b60008083601f84011261118457600080fd5b5081356001600160401b0381111561119b57600080fd5b6020830191508360208285010111156111b357600080fd5b9250929050565b600080600080600080600060c0888a0312156111d557600080fd5b6111de88611156565b96506020880135955060408801356001600160401b0381111561120057600080fd5b61120c8a828b01611172565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561124057600080fd5b81356001600160e01b03198116811461087057600080fd5b60008060008060008060a0878903121561127157600080fd5b61127a87611156565b95506020870135945060408701356001600160401b0381111561129c57600080fd5b6112a889828a01611172565b979a9699509760608101359660809091013595509350505050565b6000602082840312156112d557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561131a5761131a6112dc565b604052919050565b600082601f83011261133357600080fd5b81356001600160401b0381111561134c5761134c6112dc565b61135f601f8201601f19166020016112f2565b81815284602083860101111561137457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113a757600080fd5b6113b085611156565b93506113be60208601611156565b92506040850135915060608501356001600160401b038111156113e057600080fd5b6113ec87828801611322565b91505092959194509250565b6000806040838503121561140b57600080fd5b8235915061141b60208401611156565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061145c57634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f84011261147457600080fd5b5081356001600160401b0381111561148b57600080fd5b6020830191508360208260051b85010111156111b357600080fd5b600080600080600080600080600060c08a8c0312156114c457600080fd5b89356001600160401b03808211156114db57600080fd5b6114e78d838e01611462565b909b50995060208c013591508082111561150057600080fd5b61150c8d838e01611462565b909950975060408c013591508082111561152557600080fd5b506115328c828d01611462565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561157357600080fd5b88356001600160401b038082111561158a57600080fd5b6115968c838d01611462565b909a50985060208b01359150808211156115af57600080fd5b6115bb8c838d01611462565b909850965060408b01359150808211156115d457600080fd5b506115e18b828c01611462565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261161057600080fd5b813560206001600160401b0382111561162b5761162b6112dc565b8160051b61163a8282016112f2565b928352848101820192828101908785111561165457600080fd5b83870192505b848310156116735782358252918301919083019061165a565b979650505050505050565b600080600080600060a0868803121561169657600080fd5b61169f86611156565b94506116ad60208701611156565b935060408601356001600160401b03808211156116c957600080fd5b6116d589838a016115ff565b945060608801359150808211156116eb57600080fd5b6116f789838a016115ff565b9350608088013591508082111561170d57600080fd5b5061171a88828901611322565b9150509295509295909350565b600080600080600060a0868803121561173f57600080fd5b61174886611156565b945061175660208701611156565b9350604086013592506060860135915060808601356001600160401b0381111561177f57600080fd5b61171a88828901611322565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a0604082015260006117dc60a08301868861178b565b60608301949094525060800152949350505050565b60018060a01b038516815283602082015260606040820152600061181960608301848661178b565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561184b57600080fd5b61087082611156565b6000808335601e1984360301811261186b57600080fd5b8301803591506001600160401b0382111561188557600080fd5b6020019150368190038213156111b357600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561192357848303601f19018952813536889003601e190181126118da57600080fd5b870184810190356001600160401b038111156118f557600080fd5b80360382131561190457600080fd5b61190f85828461178b565b9a86019a94505050908301906001016118b4565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b811015611971576001600160a01b0361195c84611156565b16825260209283019290910190600101611943565b5083810360208501528881526001600160fb1b0389111561199157600080fd5b8860051b9150818a602083013701828103602090810160408501526119b9908201878961189a565b60608401959095525050608001529695505050505050565b808201808211156106bf57634e487b7160e01b600052601160045260246000fd5b818382376000910190815291905056fea2646970667358221220d82d80986c3afa2dc55fdf8ff5c77f0b1f8dcd17e320484434a202763974ab0a64736f6c63430008180033000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d390000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39" + }, + { + "transactionType": "CREATE", + "address": "0x73246a05ee4ff05666f1e7d527b69e5199183000", + "initCode": "0x608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c6343000818003300000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe" + } + ], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x1ad2d", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x13788e059d89528a773de059dc043d716fa0f83654b807fccc8370e3d5314579", + "transactionIndex": "0x0", + "blockHash": "0xee716cadee427af0b5e7dc3c5ff9b1a5d7751d1867de2245ecd2f03450e6de93", + "blockNumber": "0x21b5ee", + "gasUsed": "0x1ad2d", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0x1c39ba375fab6a9f6e0c01b9f49d488e101c2011", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x31c824", + "logs": [ + { + "address": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "blockHash": "0x67d00e3ffcf3a166fdd8db588270cbc7cd432cca53cceda59fcd3b1779e3df55", + "blockNumber": "0x21b5ef", + "blockTimestamp": "0x66cc6248", + "transactionHash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008010000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionIndex": "0x0", + "blockHash": "0x67d00e3ffcf3a166fdd8db588270cbc7cd432cca53cceda59fcd3b1779e3df55", + "blockNumber": "0x21b5ef", + "gasUsed": "0x31c824", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x3ca3c3", + "logs": [ + { + "address": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x73246a05ee4ff05666f1e7d527b69e5199183000", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0xa", + "removed": false + } + ], + "logsBloom": "0x00000084000000000000000000000400020000000000000000800000000000800000000000000004000000000001000000400000000000000200000010200000000000000000000000000010000002004081000000000000000000000800000000000000020000000000000100000800000000040000000000020000000000400000000000000000000020000002000000000000000000080000000000000000000800000022000000004000000000000000000000000008001000000000080000000000000000204000000000000000000000002000000100000101200020000000000000000400000000000000000000000000000000000000000000400000", + "type": "0x2", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "gasUsed": "0x3ca3c3", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724670724, + "chain": 17000, + "commit": "eb5e562" +} \ No newline at end of file diff --git a/broadcast/DeployVaultFactory.sol/17000/run-latest.json b/broadcast/DeployVaultFactory.sol/17000/run-latest.json new file mode 100644 index 0000000..15caae7 --- /dev/null +++ b/broadcast/DeployVaultFactory.sol/17000/run-latest.json @@ -0,0 +1,336 @@ +{ + "transactions": [ + { + "hash": "0x13788e059d89528a773de059dc043d716fa0f83654b807fccc8370e3d5314579", + "transactionType": "CREATE", + "contractName": "HoleskyActors", + "contractAddress": "0x1c39ba375fab6a9f6e0c01b9f49d488e101c2011", + "function": null, + "arguments": null, + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x22dd3", + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b50610105806100206000396000f3fe6080604052348015600f57600080fd5b506004361060735760003560e01c8063364061961160545780633640619614609b578063497865501460b557806389a3d3951460b5578063983d27371460b557600080fd5b8063075fd2b11460785780632a0acc6a14609b5780632e671ffa14609b575b600080fd5b607f600081565b6040516001600160a01b03909116815260200160405180910390f35b607f73743b91cdb1c694d4f51bcda3a4a59dcc0d02b91381565b607f739dd8f69b62ddfd990241530f47dced0dad7f7d398156fea2646970667358221220409d9e3ae4aeb0a007635e37a40557ceb3abeefc255e9d88dc3852166aa3cb0a64736f6c63430008180033", + "nonce": "0x1c9", + "chainId": "0x4268" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionType": "CREATE", + "contractName": "SingleVault", + "contractAddress": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "function": null, + "arguments": null, + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x40b2a1", + "value": "0x0", + "input": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b61399380620000e66000396000f3fe6080604052600436106103545760003560e01c80637958004c116101c6578063bc197c81116100f7578063d905777e11610095578063ef8b30f71161006f578063ef8b30f714610920578063f23a6e6114610a0d578063f27a0c9214610a39578063f5b541a614610a6d57600080fd5b8063d905777e146109ba578063dd62ed3e146109da578063e38335e5146109fa57600080fd5b8063c6e6f592116100d1578063c6e6f59214610920578063ce96cb7714610940578063d45c443514610960578063d547741f1461099a57600080fd5b8063bc197c81146108d4578063c4d252f514610900578063c63d75b61461064557600080fd5b8063a217fddf11610164578063b1c5f4271161013e578063b1c5f42714610854578063b3d7f6b914610874578063b460af9414610894578063ba087652146108b457600080fd5b8063a217fddf146107eb578063a9059cbb14610800578063b08e51c01461082057600080fd5b80638f61f4f5116101a05780638f61f4f51461077457806391d148541461079657806394bf804d146107b657806395d89b41146107d657600080fd5b80637958004c146107075780638065657f146107345780638f2a0bb01461075457600080fd5b8063248a9ca3116102a0578063402d267d1161023e57806364d623531161021857806364d623531461068757806365603dc3146106a75780636e553f65146106c757806370a08231146106e757600080fd5b8063402d267d146106455780634cdad506146103fc578063584b153e1461066757600080fd5b8063313ce5671161027a578063313ce567146105a957806331d50750146105d057806336568abe146105f057806338d52e0f1461061057600080fd5b8063248a9ca3146105495780632ab0f529146105695780632f2ff15d1461058957600080fd5b8063095ea7b31161030d57806313bc9f20116102e757806313bc9f2014610491578063150b7a02146104b157806318160ddd146104f557806323b872dd1461052957600080fd5b8063095ea7b31461043e5780630a28a4771461045e578063134008d31461047e57600080fd5b806301d5062a1461036057806301e1d1141461038257806301ffc9a7146103aa57806306fdde03146103da57806307a2d13a146103fc57806307bd02651461041c57600080fd5b3661035b57005b600080fd5b34801561036c57600080fd5b5061038061037b366004612b07565b610aa1565b005b34801561038e57600080fd5b50610397610b65565b6040519081526020015b60405180910390f35b3480156103b657600080fd5b506103ca6103c5366004612b7d565b610be9565b60405190151581526020016103a1565b3480156103e657600080fd5b506103ef610bfa565b6040516103a19190612bcb565b34801561040857600080fd5b50610397610417366004612bfe565b610cbd565b34801561042857600080fd5b5061039760008051602061393e83398151915281565b34801561044a57600080fd5b506103ca610459366004612c17565b610cca565b34801561046a57600080fd5b50610397610479366004612bfe565b610ce2565b61038061048c366004612c43565b610cef565b34801561049d57600080fd5b506103ca6104ac366004612bfe565b610d92565b3480156104bd57600080fd5b506104dc6104cc366004612d65565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016103a1565b34801561050157600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0254610397565b34801561053557600080fd5b506103ca610544366004612dd0565b610db8565b34801561055557600080fd5b50610397610564366004612bfe565b610dde565b34801561057557600080fd5b506103ca610584366004612bfe565b610e00565b34801561059557600080fd5b506103806105a4366004612e11565b610e09565b3480156105b557600080fd5b506105be610e2b565b60405160ff90911681526020016103a1565b3480156105dc57600080fd5b506103ca6105eb366004612bfe565b610e57565b3480156105fc57600080fd5b5061038061060b366004612e11565b610e7c565b34801561061c57600080fd5b506000805160206138fe833981519152546040516001600160a01b0390911681526020016103a1565b34801561065157600080fd5b50610397610660366004612e41565b5060001990565b34801561067357600080fd5b506103ca610682366004612bfe565b610eb4565b34801561069357600080fd5b506103806106a2366004612bfe565b610ef9565b3480156106b357600080fd5b506103806106c2366004612ea2565b610f7e565b3480156106d357600080fd5b506103976106e2366004612e11565b6111e6565b3480156106f357600080fd5b50610397610702366004612e41565b61120c565b34801561071357600080fd5b50610727610722366004612bfe565b611234565b6040516103a19190612faf565b34801561074057600080fd5b5061039761074f366004612c43565b611292565b34801561076057600080fd5b5061038061076f366004612fd7565b6112d1565b34801561078057600080fd5b5061039760008051602061391e83398151915281565b3480156107a257600080fd5b506103ca6107b1366004612e11565b61144d565b3480156107c257600080fd5b506103976107d1366004612e11565b611485565b3480156107e257600080fd5b506103ef6114a3565b3480156107f757600080fd5b50610397600081565b34801561080c57600080fd5b506103ca61081b366004612c17565b6114e2565b34801561082c57600080fd5b506103977ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b34801561086057600080fd5b5061039761086f366004613088565b6114f0565b34801561088057600080fd5b5061039761088f366004612bfe565b611535565b3480156108a057600080fd5b506103976108af366004613130565b611542565b3480156108c057600080fd5b506103976108cf366004613130565b61159a565b3480156108e057600080fd5b506104dc6108ef3660046131f1565b63bc197c8160e01b95945050505050565b34801561090c57600080fd5b5061038061091b366004612bfe565b6115e9565b34801561092c57600080fd5b5061039761093b366004612bfe565b6116a4565b34801561094c57600080fd5b5061039761095b366004612e41565b6116b1565b34801561096c57600080fd5b5061039761097b366004612bfe565b600090815260008051602061389e833981519152602052604090205490565b3480156109a657600080fd5b506103806109b5366004612e11565b6116c6565b3480156109c657600080fd5b506103976109d5366004612e41565b6116e2565b3480156109e657600080fd5b506103976109f536600461329e565b6116ed565b610380610a08366004613088565b611737565b348015610a1957600080fd5b506104dc610a283660046132cc565b63f23a6e6160e01b95945050505050565b348015610a4557600080fd5b507f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360154610397565b348015610a7957600080fd5b506103977f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60008051602061391e833981519152610ab9816118ac565b6000610ac9898989898989611292565b9050610ad581846118b9565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610b119695949392919061335d565b60405180910390a38315610b5a57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b5191815260200190565b60405180910390a25b505050505050505050565b6000806000805160206138fe83398151915280546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be3919061339a565b91505090565b6000610bf48261197c565b92915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060916000805160206138be83398151915291610c39906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c65906133b3565b8015610cb25780601f10610c8757610100808354040283529160200191610cb2565b820191906000526020600020905b815481529060010190602001808311610c9557829003601f168201915b505050505091505090565b6000610bf48260006119a1565b600033610cd88185856119fa565b5060019392505050565b6000610bf4826001611a07565b60008051602061393e833981519152610d0981600061144d565b610d1757610d178133611a56565b6000610d27888888888888611292565b9050610d338185611a93565b610d3f88888888611ae1565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a604051610d7794939291906133e7565b60405180910390a3610d8881611b59565b5050505050505050565b600060025b610da083611234565b6003811115610db157610db1612f99565b1492915050565b600033610dc6858285611b92565b610dd1858585611bdf565b60019150505b9392505050565b60009081526000805160206138de833981519152602052604090206001015490565b60006003610d97565b610e1282610dde565b610e1b816118ac565b610e258383611c3e565b50505050565b6000806000805160206138fe833981519152905060008154610be39190600160a01b900460ff16613425565b600080610e6383611234565b6003811115610e7457610e74612f99565b141592915050565b6001600160a01b0381163314610ea55760405163334bd91960e11b815260040160405180910390fd5b610eaf8282611ce3565b505050565b600080610ec083611234565b90506001816003811115610ed657610ed6612f99565b1480610dd757506002816003811115610ef157610ef1612f99565b149392505050565b60008051602061389e83398151915233308114610f395760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b600182015460408051918252602082018590527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15060010155565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015610fc35750825b90506000826001600160401b03166001148015610fdf5750303b155b905081158015610fed575080155b1561100b5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561103557845460ff60401b1916600160401b1785555b6110b88f8f8f8f8f8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d5f92505050565b6111358a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508f611f95565b61113f8e8e611fa9565b6111488f611fbb565b611150611fcc565b611158611fd6565b61116360008d611c3e565b5061118e7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298c611c3e565b5083156111d557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b600060001960006111f6856116a4565b905061120433858784611fe6565b949350505050565b6001600160a01b031660009081526000805160206138be833981519152602052604090205490565b600081815260008051602061389e8339815191526020526040812054806000036112615750600092915050565b600181036112725750600392915050565b428111156112835750600192915050565b50600292915050565b50919050565b60008686868686866040516020016112af9695949392919061335d565b6040516020818303038152906040528051906020012090509695505050505050565b60008051602061391e8339815191526112e9816118ac565b88871415806112f85750888514155b1561132a576040516001624fcdef60e01b03198152600481018a90526024810186905260448101889052606401610f30565b600061133c8b8b8b8b8b8b8b8b6114f0565b905061134881846118b9565b60005b8a8110156113fe5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e858181106113885761138861345f565b905060200201602081019061139d9190612e41565b8d8d868181106113af576113af61345f565b905060200201358c8c878181106113c8576113c861345f565b90506020028101906113da9190613475565b8c8b6040516113ee9695949392919061335d565b60405180910390a360010161134b565b50831561144057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161143791815260200190565b60405180910390a25b5050505050505050505050565b60009182526000805160206138de833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600019600061149585611535565b905061120433858388611fe6565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060916000805160206138be83398151915291610c39906133b3565b600033610cd8818585611bdf565b60008888888888888888604051602001611511989796959493929190613551565b60405160208183030381529060405280519060200120905098975050505050505050565b6000610bf48260016119a1565b60008061154e836116b1565b90508085111561157757828582604051633fa733bb60e21b8152600401610f309392919061343e565b600061158286610ce2565b90506115913386868985612073565b95945050505050565b6000806115a6836116e2565b9050808511156115cf57828582604051632e52afbb60e21b8152600401610f309392919061343e565b60006115da86610cbd565b9050611591338686848a612073565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783611613816118ac565b60008051602061389e83398151915261162b83610eb4565b611667578261163a6002612128565b6116446001612128565b604051635ead8eb560e01b81526004810193909352176024820152604401610f30565b6000838152602082905260408082208290555184917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a2505050565b6000610bf4826000611a07565b6000610bf46116bf8361120c565b60006119a1565b6116cf82610dde565b6116d8816118ac565b610e258383611ce3565b6000610bf48261120c565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b60008051602061393e83398151915261175181600061144d565b61175f5761175f8133611a56565b878614158061176e5750878414155b156117a0576040516001624fcdef60e01b03198152600481018990526024810185905260448101879052606401610f30565b60006117b28a8a8a8a8a8a8a8a6114f0565b90506117be8185611a93565b60005b898110156118965760008b8b838181106117dd576117dd61345f565b90506020020160208101906117f29190612e41565b905060008a8a848181106118085761180861345f565b9050602002013590503660008a8a868181106118265761182661345f565b90506020028101906118389190613475565b9150915061184884848484611ae1565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588686868660405161187f94939291906133e7565b60405180910390a3505050508060010190506117c1565b506118a081611b59565b50505050505050505050565b6118b68133611a56565b50565b60008051602061389e8339815191526118d183610e57565b1561190357826118e16000612128565b604051635ead8eb560e01b815260048101929092526024820152604401610f30565b600061192d7f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015490565b90508083101561195a57604051635433660960e01b81526004810184905260248101829052604401610f30565b61196483426135f4565b60009485526020929092525060409092209190915550565b60006001600160e01b03198216630271189760e51b1480610bf45750610bf48261214b565b6000610dd76119ae610b65565b6119b99060016135f4565b6119c56000600a6136eb565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546119f191906135f4565b85919085612180565b610eaf83838360016121cf565b6000610dd7611a1782600a6136eb565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0254611a4391906135f4565b611a4b610b65565b6119f19060016135f4565b611a60828261144d565b611a8f5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610f30565b5050565b611a9c82610d92565b611aab57816118e16002612128565b8015801590611ac05750611abe81610e00565b155b15611a8f5760405163121534c360e31b815260048101829052602401610f30565b600080856001600160a01b0316858585604051611aff9291906136fa565b60006040518083038185875af1925050503d8060008114611b3c576040519150601f19603f3d011682016040523d82523d6000602084013e611b41565b606091505b5091509150611b5082826122ae565b50505050505050565b60008051602061389e833981519152611b7182610d92565b611b8057816118e16002612128565b60009182526020526040902060019055565b6000611b9e84846116ed565b90506000198114610e255781811015611bd057828183604051637dc7a0d960e11b8152600401610f309392919061343e565b610e25848484840360006121cf565b6001600160a01b038316611c0957604051634b637e8f60e11b815260006004820152602401610f30565b6001600160a01b038216611c335760405163ec442f0560e01b815260006004820152602401610f30565b610eaf8383836122ca565b60006000805160206138de833981519152611c59848461144d565b611cd9576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055611c8f3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610bf4565b6000915050610bf4565b60006000805160206138de833981519152611cfe848461144d565b15611cd9576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610bf4565b6001600160a01b038716611db55760405162461bcd60e51b815260206004820152601c60248201527f41737365742063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610f30565b6000865111611dfd5760405162461bcd60e51b81526020600482015260146024820152734e616d652063616e6e6f7420626520656d70747960601b6044820152606401610f30565b6000855111611e475760405162461bcd60e51b815260206004820152601660248201527553796d626f6c2063616e6e6f7420626520656d70747960501b6044820152606401610f30565b6001600160a01b038416611e9d5760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610f30565b6001600160a01b038316611ef35760405162461bcd60e51b815260206004820152601f60248201527f4f70657261746f722063616e6e6f74206265207a65726f2061646472657373006044820152606401610f30565b6000825111611f445760405162461bcd60e51b815260206004820152601960248201527f50726f706f736572732063616e6e6f7420626520656d707479000000000000006044820152606401610f30565b6000815111611b505760405162461bcd60e51b815260206004820152601960248201527f4578656375746f72732063616e6e6f7420626520656d707479000000000000006044820152606401610f30565b611f9d6123f5565b610e258484848461243e565b611fb16123f5565b611a8f828261257d565b611fc36123f5565b6118b6816125ce565b611fd46123f5565b565b611fde6123f5565b611fd4612640565b6000805160206138fe833981519152805461200c906001600160a01b031686308661266e565b61201684836126d5565b836001600160a01b0316856001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78585604051612064929190918252602082015260400190565b60405180910390a35050505050565b6000805160206138fe8339815191526001600160a01b03868116908516146120a0576120a0848784611b92565b6120aa848361270b565b80546120c0906001600160a01b03168685612741565b836001600160a01b0316856001600160a01b0316876001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8686604051612118929190918252602082015260400190565b60405180910390a4505050505050565b600081600381111561213c5761213c612f99565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b1480610bf457506301ffc9a760e01b6001600160e01b0319831614610bf4565b60008061218e868686612772565b905061219983612836565b80156121b55750600084806121b0576121b061370a565b868809115b15611591576121c56001826135f4565b9695505050505050565b6000805160206138be8339815191526001600160a01b0385166122085760405163e602df0560e01b815260006004820152602401610f30565b6001600160a01b03841661223257604051634a1406b160e11b815260006004820152602401610f30565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156122a757836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161206491815260200190565b5050505050565b6060826122c3576122be82612863565b610bf4565b5080610bf4565b6000805160206138be8339815191526001600160a01b03841661230657818160020160008282546122fb91906135f4565b909155506123659050565b6001600160a01b038416600090815260208290526040902054828110156123465784818460405163391434e360e21b8152600401610f309392919061343e565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b0383166123835760028101805483900390556123a2565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516123e791815260200190565b60405180910390a350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16611fd457604051631afcd79f60e31b815260040160405180910390fd5b6124466123f5565b60008051602061389e833981519152612460600030611c3e565b506001600160a01b0382161561247d5761247b600083611c3e565b505b60005b84518110156124fa576124ba60008051602061391e8339815191528683815181106124ad576124ad61345f565b6020026020010151611c3e565b506124f17ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f7838683815181106124ad576124ad61345f565b50600101612480565b5060005b83518110156125345761252b60008051602061393e8339815191528583815181106124ad576124ad61345f565b506001016124fe565b50600181018590556040805160008152602081018790527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15050505050565b6125856123f5565b6000805160206138be8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036125bf8482613770565b5060048101610e258382613770565b6125d66123f5565b6000805160206138fe8339815191526000806125f18461288c565b9150915081612601576012612603565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b6126486123f5565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6040516001600160a01b038481166024830152838116604483015260648201839052610e259186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612968565b6001600160a01b0382166126ff5760405163ec442f0560e01b815260006004820152602401610f30565b611a8f600083836122ca565b6001600160a01b03821661273557604051634b637e8f60e11b815260006004820152602401610f30565b611a8f826000836122ca565b6040516001600160a01b03838116602483015260448201839052610eaf91859182169063a9059cbb906064016126a3565b60008383028160001985870982811083820303915050806000036127a95783828161279f5761279f61370a565b0492505050610dd7565b8084116127c95760405163227bc15360e01b815260040160405180910390fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6000600282600381111561284c5761284c612f99565b612856919061382f565b60ff166001149050919050565b8051156128735780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290516000918291829182916001600160a01b038716916128d39161385f565b600060405180830381855afa9150503d806000811461290e576040519150601f19603f3d011682016040523d82523d6000602084013e612913565b606091505b509150915081801561292757506020815110155b1561295b57600081806020019051810190612942919061339a565b905060ff8111612959576001969095509350505050565b505b5060009485945092505050565b600061297d6001600160a01b038416836129cb565b905080516000141580156129a25750808060200190518101906129a0919061387b565b155b15610eaf57604051635274afe760e01b81526001600160a01b0384166004820152602401610f30565b6060610dd78383600084600080856001600160a01b031684866040516129f1919061385f565b60006040518083038185875af1925050503d8060008114612a2e576040519150601f19603f3d011682016040523d82523d6000602084013e612a33565b606091505b50915091506121c5868383606082612a5357612a4e82612863565b610dd7565b8151158015612a6a57506001600160a01b0384163b155b15612a9357604051639996b31560e01b81526001600160a01b0385166004820152602401610f30565b5080610dd7565b6001600160a01b03811681146118b657600080fd5b8035612aba81612a9a565b919050565b60008083601f840112612ad157600080fd5b5081356001600160401b03811115612ae857600080fd5b602083019150836020828501011115612b0057600080fd5b9250929050565b600080600080600080600060c0888a031215612b2257600080fd5b8735612b2d81612a9a565b96506020880135955060408801356001600160401b03811115612b4f57600080fd5b612b5b8a828b01612abf565b989b979a50986060810135976080820135975060a09091013595509350505050565b600060208284031215612b8f57600080fd5b81356001600160e01b031981168114610dd757600080fd5b60005b83811015612bc2578181015183820152602001612baa565b50506000910152565b6020815260008251806020840152612bea816040850160208701612ba7565b601f01601f19169190910160400192915050565b600060208284031215612c1057600080fd5b5035919050565b60008060408385031215612c2a57600080fd5b8235612c3581612a9a565b946020939093013593505050565b60008060008060008060a08789031215612c5c57600080fd5b8635612c6781612a9a565b95506020870135945060408701356001600160401b03811115612c8957600080fd5b612c9589828a01612abf565b979a9699509760608101359660809091013595509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612cee57612cee612cb0565b604052919050565b600082601f830112612d0757600080fd5b81356001600160401b03811115612d2057612d20612cb0565b612d33601f8201601f1916602001612cc6565b818152846020838601011115612d4857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215612d7b57600080fd5b8435612d8681612a9a565b93506020850135612d9681612a9a565b92506040850135915060608501356001600160401b03811115612db857600080fd5b612dc487828801612cf6565b91505092959194509250565b600080600060608486031215612de557600080fd5b8335612df081612a9a565b92506020840135612e0081612a9a565b929592945050506040919091013590565b60008060408385031215612e2457600080fd5b823591506020830135612e3681612a9a565b809150509250929050565b600060208284031215612e5357600080fd5b8135610dd781612a9a565b60008083601f840112612e7057600080fd5b5081356001600160401b03811115612e8757600080fd5b6020830191508360208260051b8501011115612b0057600080fd5b6000806000806000806000806000806101008b8d031215612ec257600080fd5b612ecb8b612aaf565b995060208b01356001600160401b0380821115612ee757600080fd5b612ef38e838f01612cf6565b9a5060408d0135915080821115612f0957600080fd5b612f158e838f01612cf6565b9950612f2360608e01612aaf565b9850612f3160808e01612aaf565b975060a08d0135965060c08d0135915080821115612f4e57600080fd5b612f5a8e838f01612e5e565b909650945060e08d0135915080821115612f7357600080fd5b50612f808d828e01612e5e565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612fd157634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600080600080600060c08a8c031215612ff557600080fd5b89356001600160401b038082111561300c57600080fd5b6130188d838e01612e5e565b909b50995060208c013591508082111561303157600080fd5b61303d8d838e01612e5e565b909950975060408c013591508082111561305657600080fd5b506130638c828d01612e5e565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156130a457600080fd5b88356001600160401b03808211156130bb57600080fd5b6130c78c838d01612e5e565b909a50985060208b01359150808211156130e057600080fd5b6130ec8c838d01612e5e565b909850965060408b013591508082111561310557600080fd5b506131128b828c01612e5e565b999c989b509699959896976060870135966080013595509350505050565b60008060006060848603121561314557600080fd5b83359250602084013561315781612a9a565b9150604084013561316781612a9a565b809150509250925092565b600082601f83011261318357600080fd5b813560206001600160401b0382111561319e5761319e612cb0565b8160051b6131ad828201612cc6565b92835284810182019282810190878511156131c757600080fd5b83870192505b848310156131e6578235825291830191908301906131cd565b979650505050505050565b600080600080600060a0868803121561320957600080fd5b853561321481612a9a565b9450602086013561322481612a9a565b935060408601356001600160401b038082111561324057600080fd5b61324c89838a01613172565b9450606088013591508082111561326257600080fd5b61326e89838a01613172565b9350608088013591508082111561328457600080fd5b5061329188828901612cf6565b9150509295509295909350565b600080604083850312156132b157600080fd5b82356132bc81612a9a565b91506020830135612e3681612a9a565b600080600080600060a086880312156132e457600080fd5b85356132ef81612a9a565b945060208601356132ff81612a9a565b9350604086013592506060860135915060808601356001600160401b0381111561332857600080fd5b61329188828901612cf6565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a06040820152600061338560a083018688613334565b60608301949094525060800152949350505050565b6000602082840312156133ac57600080fd5b5051919050565b600181811c908216806133c757607f821691505b60208210810361128c57634e487b7160e01b600052602260045260246000fd5b60018060a01b03851681528360208201526060604082015260006121c5606083018486613334565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115610bf457610bf461340f565b6001600160a01b039390931683526020830191909152604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261348c57600080fd5b8301803591506001600160401b038211156134a657600080fd5b602001915036819003821315612b0057600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561354457848303601f19018952813536889003601e190181126134fb57600080fd5b870184810190356001600160401b0381111561351657600080fd5b80360382131561352557600080fd5b613530858284613334565b9a86019a94505050908301906001016134d5565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b81101561359457823561357781612a9a565b6001600160a01b0316825260209283019290910190600101613564565b5083810360208501528881526001600160fb1b038911156135b457600080fd5b8860051b9150818a602083013701828103602090810160408501526135dc90820187896134bb565b60608401959095525050608001529695505050505050565b80820180821115610bf457610bf461340f565b600181815b808511156136425781600019048211156136285761362861340f565b8085161561363557918102915b93841c939080029061360c565b509250929050565b60008261365957506001610bf4565b8161366657506000610bf4565b816001811461367c5760028114613686576136a2565b6001915050610bf4565b60ff8411156136975761369761340f565b50506001821b610bf4565b5060208310610133831016604e8410600b84101617156136c5575081810a610bf4565b6136cf8383613607565b80600019048211156136e3576136e361340f565b029392505050565b6000610dd760ff84168361364a565b8183823760009101908152919050565b634e487b7160e01b600052601260045260246000fd5b601f821115610eaf576000816000526020600020601f850160051c810160208610156137495750805b601f850160051c820191505b8181101561376857828155600101613755565b505050505050565b81516001600160401b0381111561378957613789612cb0565b61379d8161379784546133b3565b84613720565b602080601f8311600181146137d257600084156137ba5750858301515b600019600386901b1c1916600185901b178555613768565b600085815260208120601f198616915b82811015613801578886015182559484019460019091019084016137e2565b508582101561381f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060ff83168061385057634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60008251613871818460208701612ba7565b9190910192915050565b60006020828403121561388d57600080fd5b81518015158114610dd757600080fdfe9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360052c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268000773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a2646970667358221220a4ca2934dc0a810c8c2c45b83a7d4c9795552aeabd4bf7bb55e6d5133d4a1ead64736f6c63430008180033", + "nonce": "0x1ca", + "chainId": "0x4268" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionType": "CREATE", + "contractName": "VaultFactory", + "contractAddress": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "function": null, + "arguments": [ + "0xb04CB6c52E73CF3e2753776030CE85a36549c9C2", + "[0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913, 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39]", + "[0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913, 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39]", + "10", + "0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913" + ], + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x4ecbf1", + "value": "0x0", + "input": "0x60806040523480156200001157600080fd5b50604051620047ff380380620047ff8339810160408190526200003491620002ea565b6200004160008262000117565b50818484836040516200005490620001eb565b620000639493929190620003cb565b604051809103906000f08015801562000080573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03929092169182179055604051620000ae90620001f9565b6001600160a01b039091168152602001604051809103906000f080158015620000db573d6000803e3d6000fd5b50600080546001600160a01b039283166001600160a01b0319918216179091556002805497909216961695909517909455506200041492505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16620001df576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055620001943390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050620001e5565b60009150505b92915050565b611e1480620024c783390190565b61052480620042db83390190565b80516001600160a01b03811681146200021f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024c57600080fd5b815160206001600160401b03808311156200026b576200026b62000224565b8260051b604051601f19603f8301168101818110848211171562000293576200029362000224565b6040529384526020818701810194908101925087851115620002b457600080fd5b6020870191505b84821015620002df57620002cf8262000207565b83529183019190830190620002bb565b979650505050505050565b600080600080600060a086880312156200030357600080fd5b6200030e8662000207565b60208701519095506001600160401b03808211156200032c57600080fd5b6200033a89838a016200023a565b955060408801519150808211156200035157600080fd5b5062000360888289016200023a565b93505060608601519150620003786080870162000207565b90509295509295909350565b60008151808452602080850194506020840160005b83811015620003c05781516001600160a01b03168752958201959082019060010162000399565b509495945050505050565b848152608060208201526000620003e6608083018662000384565b8281036040840152620003fa818662000384565b91505060018060a01b038316606083015295945050505050565b6120a380620004246000396000f3fe60806040523480156200001157600080fd5b5060043610620001095760003560e01c8063578b04b611620000a3578063a217fddf116200006e578063a217fddf1462000273578063d33219b4146200027c578063d547741f1462000290578063df6691c914620002a757600080fd5b8063578b04b6146200021a5780636c32c01a14620002315780636f4e9f18146200024857806391d14854146200025c57600080fd5b80632f2ff15d11620000e45780632f2ff15d146200018957806336568abe14620001a25780633e47158c14620001b957806354fd4d5014620001e657600080fd5b806301ffc9a7146200010e57806311b6f8e6146200013a578063248a9ca31462000163575b600080fd5b620001256200011f36600462000a1d565b620002bb565b60405190151581526020015b60405180910390f35b620001516200014b36600462000b11565b620002f3565b60405162000131949392919062000bdf565b6200017a6200017436600462000c34565b62000454565b60405190815260200162000131565b620001a06200019a36600462000c76565b62000477565b005b620001a0620001b336600462000c76565b6200049f565b600054620001cd906001600160a01b031681565b6040516001600160a01b03909116815260200162000131565b6200020b604051806040016040528060058152602001640302e312e360dc1b81525081565b60405162000131919062000ca9565b620001a06200022b36600462000cbe565b620004da565b620001cd6200024236600462000d88565b620005b4565b600254620001cd906001600160a01b031681565b620001256200026d36600462000c76565b62000834565b6200017a600081565b600154620001cd906001600160a01b031681565b620001a0620002a136600462000c76565b6200086d565b600354620001cd906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b1480620002ed57506301ffc9a760e01b6001600160e01b03198316145b92915050565b8051602081830181018051600482529282019190930120915280546001820180546001600160a01b0390921692916200032c9062000e84565b80601f01602080910402602001604051908101604052809291908181526020018280546200035a9062000e84565b8015620003ab5780601f106200037f57610100808354040283529160200191620003ab565b820191906000526020600020905b8154815290600101906020018083116200038d57829003601f168201915b505050505090806002018054620003c29062000e84565b80601f0160208091040260200160405190810160405280929190818152602001828054620003f09062000e84565b8015620004415780601f10620004155761010080835404028352916020019162000441565b820191906000526020600020905b8154815290600101906020018083116200042357829003601f168201915b5050506003909301549192505060ff1684565b60009081526000805160206200204e833981519152602052604090206001015490565b620004828262000454565b6200048d816200088f565b6200049983836200089e565b50505050565b6001600160a01b0381163314620004c95760405163334bd91960e11b815260040160405180910390fd5b620004d582826200094a565b505050565b6000620004e7816200088f565b6001600160a01b0383166200050f5760405163d92e233d60e01b815260040160405180910390fd5b600082600181111562000526576200052662000ba6565b146200054e57600380546001600160a01b0319166001600160a01b038516179055826200056b565b600280546001600160a01b0319166001600160a01b038516179055825b50826001600160a01b03167f4012f0d4c2e46377c360faa001a6ecb880f68c61337bd2d4785233740ba1315383604051620005a7919062000ec0565b60405180910390a2505050565b600080620005c2816200088f565b60006001600160a01b0316600489604051620005df919062000ed0565b908152604051908190036020019020546001600160a01b0316146200061757604051631f626a8d60e21b815260040160405180910390fd5b60006040518060800160405280604d815260200162002001604d913990506000600260009054906101000a90046001600160a01b031660008054906101000a90046001600160a01b0316838e8e8e8e8e8e8e8e6040516024016200068398979695949392919062000f35565b60408051601f198184030181529082905291620006a09162000ed0565b60408051918290039091206020830180516001600160e01b03166001600160e01b031990921691909117905251620006d89062000a0f565b620006e69392919062000fc5565b604051809103906000f08015801562000703573d6000803e3d6000fd5b5090506040518060800160405280826001600160a01b031681526020018c81526020018b81526020016000600181111562000742576200074262000ba6565b81525060048b60405162000757919062000ed0565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b0390911617815590820151600182019062000798908262001047565b5060408201516002820190620007af908262001047565b50606082015160038201805460ff191660018381811115620007d557620007d562000ba6565b0217905550905050806001600160a01b03167fe90180b6ad74de4a220e5b6a56966ddfeb451c01b2abebdb67ca4f9458584a428c8c60006040516200081d9392919062001114565b60405180910390a29b9a5050505050505050505050565b60009182526000805160206200204e833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b620008788262000454565b62000883816200088f565b6200049983836200094a565b6200089b8133620009cb565b50565b60006000805160206200204e833981519152620008bc848462000834565b6200093f576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055620008f43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050620002ed565b6000915050620002ed565b60006000805160206200204e83398151915262000968848462000834565b156200093f576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050620002ed565b620009d7828262000834565b62000a0b5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b610eb1806200115083390190565b60006020828403121562000a3057600080fd5b81356001600160e01b03198116811462000a4957600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562000a925762000a9262000a50565b604052919050565b600082601f83011262000aac57600080fd5b813567ffffffffffffffff81111562000ac95762000ac962000a50565b62000ade601f8201601f191660200162000a66565b81815284602083860101111562000af457600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121562000b2457600080fd5b813567ffffffffffffffff81111562000b3c57600080fd5b62000b4a8482850162000a9a565b949350505050565b60005b8381101562000b6f57818101518382015260200162000b55565b50506000910152565b6000815180845262000b9281602086016020860162000b52565b601f01601f19169290920160200192915050565b634e487b7160e01b600052602160045260246000fd5b6002811062000bdb57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b038516815260806020820181905260009062000c059083018662000b78565b828103604084015262000c19818662000b78565b91505062000c2b606083018462000bbc565b95945050505050565b60006020828403121562000c4757600080fd5b5035919050565b6001600160a01b03811681146200089b57600080fd5b803562000c718162000c4e565b919050565b6000806040838503121562000c8a57600080fd5b82359150602083013562000c9e8162000c4e565b809150509250929050565b60208152600062000a49602083018462000b78565b6000806040838503121562000cd257600080fd5b823562000cdf8162000c4e565b915060208301356002811062000c9e57600080fd5b600082601f83011262000d0657600080fd5b8135602067ffffffffffffffff82111562000d255762000d2562000a50565b8160051b62000d3682820162000a66565b928352848101820192828101908785111562000d5157600080fd5b83870192505b8483101562000d7d57823562000d6d8162000c4e565b8252918301919083019062000d57565b979650505050505050565b600080600080600080600080610100898b03121562000da657600080fd5b62000db18962000c64565b9750602089013567ffffffffffffffff8082111562000dcf57600080fd5b62000ddd8c838d0162000a9a565b985060408b013591508082111562000df457600080fd5b62000e028c838d0162000a9a565b975062000e1260608c0162000c64565b965062000e2260808c0162000c64565b955060a08b0135945060c08b013591508082111562000e4057600080fd5b62000e4e8c838d0162000cf4565b935060e08b013591508082111562000e6557600080fd5b5062000e748b828c0162000cf4565b9150509295985092959890939650565b600181811c9082168062000e9957607f821691505b60208210810362000eba57634e487b7160e01b600052602260045260246000fd5b50919050565b60208101620002ed828462000bbc565b6000825162000ee481846020870162000b52565b9190910192915050565b60008151808452602080850194506020840160005b8381101562000f2a5781516001600160a01b03168752958201959082019060010162000f03565b509495945050505050565b6001600160a01b0389811682526101006020830181905260009162000f5d8483018c62000b78565b9150838203604085015262000f73828b62000b78565b915080891660608501528088166080850152508560a084015282810360c084015262000fa0818662000eee565b905082810360e084015262000fb6818562000eee565b9b9a5050505050505050505050565b6001600160a01b0384811682528316602082015260606040820181905260009062000c2b9083018462000b78565b601f821115620004d5576000816000526020600020601f850160051c810160208610156200101e5750805b601f850160051c820191505b818110156200103f578281556001016200102a565b505050505050565b815167ffffffffffffffff81111562001064576200106462000a50565b6200107c8162001075845462000e84565b8462000ff3565b602080601f831160018114620010b457600084156200109b5750858301515b600019600386901b1c1916600185901b1785556200103f565b600085815260208120601f198616915b82811015620010e557888601518255948401946001909101908401620010c4565b5085821015620011045787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60608152600062001129606083018662000b78565b82810360208401526200113d818662000b78565b91505062000b4a604083018462000bbc56fe60a060405260405162000eb138038062000eb18339810160408190526200002691620003cd565b82816200003482826200009c565b505081604051620000459062000366565b6001600160a01b039091168152602001604051809103906000f08015801562000072573d6000803e3d6000fd5b506001600160a01b0316608052620000936200008d60805190565b62000102565b505050620004cb565b620000a78262000174565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115620000f457620000ef8282620001f4565b505050565b620000fe62000271565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014460008051602062000e91833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620001718162000293565b50565b806001600160a01b03163b600003620001b057604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080846001600160a01b031684604051620002139190620004ad565b600060405180830381855af49150503d806000811462000250576040519150601f19603f3d011682016040523d82523d6000602084013e62000255565b606091505b50909250905062000268858383620002d6565b95945050505050565b3415620002915760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b038116620002bf57604051633173bdd160e11b815260006004820152602401620001a7565b8060008051602062000e91833981519152620001d3565b606082620002ef57620002e9826200033c565b62000335565b81511580156200030757506001600160a01b0384163b155b156200033257604051639996b31560e01b81526001600160a01b0385166004820152602401620001a7565b50805b9392505050565b8051156200034d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b610524806200096d83390190565b80516001600160a01b03811681146200038c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003c4578181015183820152602001620003aa565b50506000910152565b600080600060608486031215620003e357600080fd5b620003ee8462000374565b9250620003fe6020850162000374565b60408501519092506001600160401b03808211156200041c57600080fd5b818601915086601f8301126200043157600080fd5b81518181111562000446576200044662000391565b604051601f8201601f19908116603f0116810190838211818310171562000471576200047162000391565b816040528281528960208487010111156200048b57600080fd5b6200049e836020830160208801620003a7565b80955050505050509250925092565b60008251620004c1818460208701620003a7565b9190910192915050565b608051610487620004e66000396000601001526104876000f3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007b576000356001600160e01b03191663278f794360e11b14610071576040516334ad5dbb60e21b815260040160405180910390fd5b610079610083565b565b6100796100b2565b6000806100933660048184610312565b8101906100a09190610352565b915091506100ae82826100c2565b5050565b6100796100bd61011d565b610155565b6100cb82610179565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156101155761011082826101f5565b505050565b6100ae61026b565b60006101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610174573d6000f35b3d6000fd5b806001600160a01b03163b6000036101b457604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102129190610422565b600060405180830381855af49150503d806000811461024d576040519150601f19603f3d011682016040523d82523d6000602084013e610252565b606091505b509150915061026285838361028a565b95945050505050565b34156100795760405163b398979f60e01b815260040160405180910390fd5b60608261029f5761029a826102e9565b6102e2565b81511580156102b657506001600160a01b0384163b155b156102df57604051639996b31560e01b81526001600160a01b03851660048201526024016101ab565b50805b9392505050565b8051156102f95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000808585111561032257600080fd5b8386111561032f57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561036557600080fd5b82356001600160a01b038116811461037c57600080fd5b9150602083013567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bf576103bf61033c565b604051601f8201601f19908116603f011681019083821181831017156103e7576103e761033c565b8160405282815288602084870101111561040057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b818110156104435760208186018101518583015201610429565b50600092019182525091905056fea26469706673582212209b91e8f79233c9ec74731835b923ca2476176adaf296c3866c220f3be4bfb69f64736f6c63430008180033608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c63430008180033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103696e697469616c697a6528616464726573732c737472696e672c737472696e672c616464726573732c616464726573732c75696e743235362c616464726573735b5d2c616464726573735b5d2902dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212200351cafa75c1d9253e6c87472a1180263b8448d685ed912bf7808a32eba7416964736f6c6343000818003360806040523480156200001157600080fd5b5060405162001e1438038062001e1483398101604081905262000034916200032f565b620000416000306200019d565b506001600160a01b0381161562000061576200005f6000826200019d565b505b60005b83518110156200010157620000bc7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1858381518110620000a857620000a8620003b6565b60200260200101516200019d60201b60201c565b50620000f77ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783858381518110620000a857620000a8620003b6565b5060010162000064565b5060005b82518110156200015357620001497fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63848381518110620000a857620000a8620003b6565b5060010162000105565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620003cc565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000242576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001f93390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000246565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200027a57600080fd5b919050565b600082601f8301126200029157600080fd5b815160206001600160401b0380831115620002b057620002b06200024c565b8260051b604051601f19603f83011681018181108482111715620002d857620002d86200024c565b6040529384526020818701810194908101925087851115620002f957600080fd5b6020870191505b848210156200032457620003148262000262565b8352918301919083019062000300565b979650505050505050565b600080600080608085870312156200034657600080fd5b845160208601519094506001600160401b03808211156200036657600080fd5b62000374888389016200027f565b945060408701519150808211156200038b57600080fd5b506200039a878288016200027f565b925050620003ab6060860162000262565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b611a3880620003dc6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f1461056a578063e38335e51461058a578063f23a6e611461059d578063f27a0c92146105c957600080fd5b8063bc197c81146104f1578063c4d252f51461051d578063d45c44351461053d57600080fd5b806391d14854116100c657806391d1485414610468578063a217fddf14610488578063b08e51c01461049d578063b1c5f427146104d157600080fd5b80638065657f146103f45780638f2a0bb0146104145780638f61f4f51461043457600080fd5b80632ab0f5291161015957806336568abe1161013357806336568abe14610367578063584b153e1461038757806364d62353146103a75780637958004c146103c757600080fd5b80632ab0f529146103075780632f2ff15d1461032757806331d507501461034757600080fd5b8063134008d311610195578063134008d31461026057806313bc9f2014610273578063150b7a0214610293578063248a9ca3146102d757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e23660046111ba565b6105de565b005b3480156101f557600080fd5b5061020961020436600461122e565b6106b4565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b6101e761026e366004611258565b6106c5565b34801561027f57600080fd5b5061020961028e3660046112c3565b61077a565b34801561029f57600080fd5b506102be6102ae366004611391565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b3480156102e357600080fd5b506102526102f23660046112c3565b60009081526020819052604090206001015490565b34801561031357600080fd5b506102096103223660046112c3565b6107a0565b34801561033357600080fd5b506101e76103423660046113f8565b6107a9565b34801561035357600080fd5b506102096103623660046112c3565b6107d4565b34801561037357600080fd5b506101e76103823660046113f8565b6107f9565b34801561039357600080fd5b506102096103a23660046112c3565b610831565b3480156103b357600080fd5b506101e76103c23660046112c3565b610877565b3480156103d357600080fd5b506103e76103e23660046112c3565b6108ea565b604051610215919061143a565b34801561040057600080fd5b5061025261040f366004611258565b610935565b34801561042057600080fd5b506101e761042f3660046114a6565b610974565b34801561044057600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561047457600080fd5b506102096104833660046113f8565b610b02565b34801561049457600080fd5b50610252600081565b3480156104a957600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104dd57600080fd5b506102526104ec366004611557565b610b2b565b3480156104fd57600080fd5b506102be61050c36600461167e565b63bc197c8160e01b95945050505050565b34801561052957600080fd5b506101e76105383660046112c3565b610b70565b34801561054957600080fd5b506102526105583660046112c3565b60009081526001602052604090205490565b34801561057657600080fd5b506101e76105853660046113f8565b610c1b565b6101e7610598366004611557565b610c40565b3480156105a957600080fd5b506102be6105b8366004611727565b63f23a6e6160e01b95945050505050565b3480156105d557600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161060881610dc7565b6000610618898989898989610935565b90506106248184610dd4565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610660969594939291906117b4565b60405180910390a383156106a957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a091815260200190565b60405180910390a25b505050505050505050565b60006106bf82610e68565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106f1816000610b02565b6106ff576106ff8133610e8d565b600061070f888888888888610935565b905061071b8185610eca565b61072788888888610f18565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161075f94939291906117f1565b60405180910390a361077081610f90565b5050505050505050565b600060025b610788836108ea565b600381111561079957610799611424565b1492915050565b6000600361077f565b6000828152602081905260409020600101546107c481610dc7565b6107ce8383610fbc565b50505050565b6000806107e0836108ea565b60038111156107f1576107f1611424565b141592915050565b6001600160a01b03811633146108225760405163334bd91960e11b815260040160405180910390fd5b61082c828261104e565b505050565b60008061083d836108ea565b9050600181600381111561085357610853611424565b14806108705750600281600381111561086e5761086e611424565b145b9392505050565b333081146108a85760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b6000818152600160205260408120548060000361090a5750600092915050565b6001810361091b5750600392915050565b4281111561092c5750600192915050565b50600292915050565b6000868686868686604051602001610952969594939291906117b4565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161099e81610dc7565b88871415806109ad5750888514155b156109df576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161089f565b60006109f18b8b8b8b8b8b8b8b610b2b565b90506109fd8184610dd4565b60005b8a811015610ab35780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a3d57610a3d611823565b9050602002016020810190610a529190611839565b8d8d86818110610a6457610a64611823565b905060200201358c8c87818110610a7d57610a7d611823565b9050602002810190610a8f9190611854565b8c8b604051610aa3969594939291906117b4565b60405180910390a3600101610a00565b508315610af557807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610aec91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b4c989796959493929190611930565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b9a81610dc7565b610ba382610831565b610bdf5781610bb260026110b9565b610bbc60016110b9565b604051635ead8eb560e01b8152600481019390935217602482015260440161089f565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c3681610dc7565b6107ce838361104e565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c6c816000610b02565b610c7a57610c7a8133610e8d565b8786141580610c895750878414155b15610cbb576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161089f565b6000610ccd8a8a8a8a8a8a8a8a610b2b565b9050610cd98185610eca565b60005b89811015610db15760008b8b83818110610cf857610cf8611823565b9050602002016020810190610d0d9190611839565b905060008a8a84818110610d2357610d23611823565b9050602002013590503660008a8a86818110610d4157610d41611823565b9050602002810190610d539190611854565b91509150610d6384848484610f18565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d9a94939291906117f1565b60405180910390a350505050806001019050610cdc565b50610dbb81610f90565b50505050505050505050565b610dd18133610e8d565b50565b610ddd826107d4565b15610e0f5781610ded60006110b9565b604051635ead8eb560e01b81526004810192909252602482015260440161089f565b6000610e1a60025490565b905080821015610e4757604051635433660960e01b8152600481018390526024810182905260440161089f565b610e5182426119d1565b600093845260016020526040909320929092555050565b60006001600160e01b03198216630271189760e51b14806106bf57506106bf826110dc565b610e978282610b02565b610ec65760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161089f565b5050565b610ed38261077a565b610ee25781610ded60026110b9565b8015801590610ef75750610ef5816107a0565b155b15610ec65760405163121534c360e31b81526004810182905260240161089f565b600080856001600160a01b0316858585604051610f369291906119f2565b60006040518083038185875af1925050503d8060008114610f73576040519150601f19603f3d011682016040523d82523d6000602084013e610f78565b606091505b5091509150610f878282611111565b50505050505050565b610f998161077a565b610fa85780610ded60026110b9565b600090815260016020819052604090912055565b6000610fc88383610b02565b611046576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610ffe3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bf565b5060006106bf565b600061105a8383610b02565b15611046576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bf565b60008160038111156110cd576110cd611424565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b14806106bf57506301ffc9a760e01b6001600160e01b03198316146106bf565b606082611126576111218261112d565b6106bf565b50806106bf565b80511561113d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461116d57600080fd5b919050565b60008083601f84011261118457600080fd5b5081356001600160401b0381111561119b57600080fd5b6020830191508360208285010111156111b357600080fd5b9250929050565b600080600080600080600060c0888a0312156111d557600080fd5b6111de88611156565b96506020880135955060408801356001600160401b0381111561120057600080fd5b61120c8a828b01611172565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561124057600080fd5b81356001600160e01b03198116811461087057600080fd5b60008060008060008060a0878903121561127157600080fd5b61127a87611156565b95506020870135945060408701356001600160401b0381111561129c57600080fd5b6112a889828a01611172565b979a9699509760608101359660809091013595509350505050565b6000602082840312156112d557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561131a5761131a6112dc565b604052919050565b600082601f83011261133357600080fd5b81356001600160401b0381111561134c5761134c6112dc565b61135f601f8201601f19166020016112f2565b81815284602083860101111561137457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113a757600080fd5b6113b085611156565b93506113be60208601611156565b92506040850135915060608501356001600160401b038111156113e057600080fd5b6113ec87828801611322565b91505092959194509250565b6000806040838503121561140b57600080fd5b8235915061141b60208401611156565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061145c57634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f84011261147457600080fd5b5081356001600160401b0381111561148b57600080fd5b6020830191508360208260051b85010111156111b357600080fd5b600080600080600080600080600060c08a8c0312156114c457600080fd5b89356001600160401b03808211156114db57600080fd5b6114e78d838e01611462565b909b50995060208c013591508082111561150057600080fd5b61150c8d838e01611462565b909950975060408c013591508082111561152557600080fd5b506115328c828d01611462565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561157357600080fd5b88356001600160401b038082111561158a57600080fd5b6115968c838d01611462565b909a50985060208b01359150808211156115af57600080fd5b6115bb8c838d01611462565b909850965060408b01359150808211156115d457600080fd5b506115e18b828c01611462565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261161057600080fd5b813560206001600160401b0382111561162b5761162b6112dc565b8160051b61163a8282016112f2565b928352848101820192828101908785111561165457600080fd5b83870192505b848310156116735782358252918301919083019061165a565b979650505050505050565b600080600080600060a0868803121561169657600080fd5b61169f86611156565b94506116ad60208701611156565b935060408601356001600160401b03808211156116c957600080fd5b6116d589838a016115ff565b945060608801359150808211156116eb57600080fd5b6116f789838a016115ff565b9350608088013591508082111561170d57600080fd5b5061171a88828901611322565b9150509295509295909350565b600080600080600060a0868803121561173f57600080fd5b61174886611156565b945061175660208701611156565b9350604086013592506060860135915060808601356001600160401b0381111561177f57600080fd5b61171a88828901611322565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a0604082015260006117dc60a08301868861178b565b60608301949094525060800152949350505050565b60018060a01b038516815283602082015260606040820152600061181960608301848661178b565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561184b57600080fd5b61087082611156565b6000808335601e1984360301811261186b57600080fd5b8301803591506001600160401b0382111561188557600080fd5b6020019150368190038213156111b357600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561192357848303601f19018952813536889003601e190181126118da57600080fd5b870184810190356001600160401b038111156118f557600080fd5b80360382131561190457600080fd5b61190f85828461178b565b9a86019a94505050908301906001016118b4565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b811015611971576001600160a01b0361195c84611156565b16825260209283019290910190600101611943565b5083810360208501528881526001600160fb1b0389111561199157600080fd5b8860051b9150818a602083013701828103602090810160408501526119b9908201878961189a565b60608401959095525050608001529695505050505050565b808201808211156106bf57634e487b7160e01b600052601160045260246000fd5b818382376000910190815291905056fea2646970667358221220d82d80986c3afa2dc55fdf8ff5c77f0b1f8dcd17e320484434a202763974ab0a64736f6c63430008180033608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c63430008180033000000000000000000000000b04cb6c52e73cf3e2753776030ce85a36549c9c200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d390000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "nonce": "0x1cb", + "chainId": "0x4268" + }, + "additionalContracts": [ + { + "transactionType": "CREATE", + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "initCode": "0x60806040523480156200001157600080fd5b5060405162001e1438038062001e1483398101604081905262000034916200032f565b620000416000306200019d565b506001600160a01b0381161562000061576200005f6000826200019d565b505b60005b83518110156200010157620000bc7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1858381518110620000a857620000a8620003b6565b60200260200101516200019d60201b60201c565b50620000f77ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783858381518110620000a857620000a8620003b6565b5060010162000064565b5060005b82518110156200015357620001497fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63848381518110620000a857620000a8620003b6565b5060010162000105565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620003cc565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000242576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001f93390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000246565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200027a57600080fd5b919050565b600082601f8301126200029157600080fd5b815160206001600160401b0380831115620002b057620002b06200024c565b8260051b604051601f19603f83011681018181108482111715620002d857620002d86200024c565b6040529384526020818701810194908101925087851115620002f957600080fd5b6020870191505b848210156200032457620003148262000262565b8352918301919083019062000300565b979650505050505050565b600080600080608085870312156200034657600080fd5b845160208601519094506001600160401b03808211156200036657600080fd5b62000374888389016200027f565b945060408701519150808211156200038b57600080fd5b506200039a878288016200027f565b925050620003ab6060860162000262565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b611a3880620003dc6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f1461056a578063e38335e51461058a578063f23a6e611461059d578063f27a0c92146105c957600080fd5b8063bc197c81146104f1578063c4d252f51461051d578063d45c44351461053d57600080fd5b806391d14854116100c657806391d1485414610468578063a217fddf14610488578063b08e51c01461049d578063b1c5f427146104d157600080fd5b80638065657f146103f45780638f2a0bb0146104145780638f61f4f51461043457600080fd5b80632ab0f5291161015957806336568abe1161013357806336568abe14610367578063584b153e1461038757806364d62353146103a75780637958004c146103c757600080fd5b80632ab0f529146103075780632f2ff15d1461032757806331d507501461034757600080fd5b8063134008d311610195578063134008d31461026057806313bc9f2014610273578063150b7a0214610293578063248a9ca3146102d757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e23660046111ba565b6105de565b005b3480156101f557600080fd5b5061020961020436600461122e565b6106b4565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b6101e761026e366004611258565b6106c5565b34801561027f57600080fd5b5061020961028e3660046112c3565b61077a565b34801561029f57600080fd5b506102be6102ae366004611391565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b3480156102e357600080fd5b506102526102f23660046112c3565b60009081526020819052604090206001015490565b34801561031357600080fd5b506102096103223660046112c3565b6107a0565b34801561033357600080fd5b506101e76103423660046113f8565b6107a9565b34801561035357600080fd5b506102096103623660046112c3565b6107d4565b34801561037357600080fd5b506101e76103823660046113f8565b6107f9565b34801561039357600080fd5b506102096103a23660046112c3565b610831565b3480156103b357600080fd5b506101e76103c23660046112c3565b610877565b3480156103d357600080fd5b506103e76103e23660046112c3565b6108ea565b604051610215919061143a565b34801561040057600080fd5b5061025261040f366004611258565b610935565b34801561042057600080fd5b506101e761042f3660046114a6565b610974565b34801561044057600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561047457600080fd5b506102096104833660046113f8565b610b02565b34801561049457600080fd5b50610252600081565b3480156104a957600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104dd57600080fd5b506102526104ec366004611557565b610b2b565b3480156104fd57600080fd5b506102be61050c36600461167e565b63bc197c8160e01b95945050505050565b34801561052957600080fd5b506101e76105383660046112c3565b610b70565b34801561054957600080fd5b506102526105583660046112c3565b60009081526001602052604090205490565b34801561057657600080fd5b506101e76105853660046113f8565b610c1b565b6101e7610598366004611557565b610c40565b3480156105a957600080fd5b506102be6105b8366004611727565b63f23a6e6160e01b95945050505050565b3480156105d557600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161060881610dc7565b6000610618898989898989610935565b90506106248184610dd4565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610660969594939291906117b4565b60405180910390a383156106a957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a091815260200190565b60405180910390a25b505050505050505050565b60006106bf82610e68565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106f1816000610b02565b6106ff576106ff8133610e8d565b600061070f888888888888610935565b905061071b8185610eca565b61072788888888610f18565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161075f94939291906117f1565b60405180910390a361077081610f90565b5050505050505050565b600060025b610788836108ea565b600381111561079957610799611424565b1492915050565b6000600361077f565b6000828152602081905260409020600101546107c481610dc7565b6107ce8383610fbc565b50505050565b6000806107e0836108ea565b60038111156107f1576107f1611424565b141592915050565b6001600160a01b03811633146108225760405163334bd91960e11b815260040160405180910390fd5b61082c828261104e565b505050565b60008061083d836108ea565b9050600181600381111561085357610853611424565b14806108705750600281600381111561086e5761086e611424565b145b9392505050565b333081146108a85760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b6000818152600160205260408120548060000361090a5750600092915050565b6001810361091b5750600392915050565b4281111561092c5750600192915050565b50600292915050565b6000868686868686604051602001610952969594939291906117b4565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161099e81610dc7565b88871415806109ad5750888514155b156109df576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161089f565b60006109f18b8b8b8b8b8b8b8b610b2b565b90506109fd8184610dd4565b60005b8a811015610ab35780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a3d57610a3d611823565b9050602002016020810190610a529190611839565b8d8d86818110610a6457610a64611823565b905060200201358c8c87818110610a7d57610a7d611823565b9050602002810190610a8f9190611854565b8c8b604051610aa3969594939291906117b4565b60405180910390a3600101610a00565b508315610af557807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610aec91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b4c989796959493929190611930565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b9a81610dc7565b610ba382610831565b610bdf5781610bb260026110b9565b610bbc60016110b9565b604051635ead8eb560e01b8152600481019390935217602482015260440161089f565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c3681610dc7565b6107ce838361104e565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c6c816000610b02565b610c7a57610c7a8133610e8d565b8786141580610c895750878414155b15610cbb576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161089f565b6000610ccd8a8a8a8a8a8a8a8a610b2b565b9050610cd98185610eca565b60005b89811015610db15760008b8b83818110610cf857610cf8611823565b9050602002016020810190610d0d9190611839565b905060008a8a84818110610d2357610d23611823565b9050602002013590503660008a8a86818110610d4157610d41611823565b9050602002810190610d539190611854565b91509150610d6384848484610f18565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d9a94939291906117f1565b60405180910390a350505050806001019050610cdc565b50610dbb81610f90565b50505050505050505050565b610dd18133610e8d565b50565b610ddd826107d4565b15610e0f5781610ded60006110b9565b604051635ead8eb560e01b81526004810192909252602482015260440161089f565b6000610e1a60025490565b905080821015610e4757604051635433660960e01b8152600481018390526024810182905260440161089f565b610e5182426119d1565b600093845260016020526040909320929092555050565b60006001600160e01b03198216630271189760e51b14806106bf57506106bf826110dc565b610e978282610b02565b610ec65760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161089f565b5050565b610ed38261077a565b610ee25781610ded60026110b9565b8015801590610ef75750610ef5816107a0565b155b15610ec65760405163121534c360e31b81526004810182905260240161089f565b600080856001600160a01b0316858585604051610f369291906119f2565b60006040518083038185875af1925050503d8060008114610f73576040519150601f19603f3d011682016040523d82523d6000602084013e610f78565b606091505b5091509150610f878282611111565b50505050505050565b610f998161077a565b610fa85780610ded60026110b9565b600090815260016020819052604090912055565b6000610fc88383610b02565b611046576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610ffe3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106bf565b5060006106bf565b600061105a8383610b02565b15611046576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106bf565b60008160038111156110cd576110cd611424565b600160ff919091161b92915050565b60006001600160e01b03198216637965db0b60e01b14806106bf57506301ffc9a760e01b6001600160e01b03198316146106bf565b606082611126576111218261112d565b6106bf565b50806106bf565b80511561113d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b038116811461116d57600080fd5b919050565b60008083601f84011261118457600080fd5b5081356001600160401b0381111561119b57600080fd5b6020830191508360208285010111156111b357600080fd5b9250929050565b600080600080600080600060c0888a0312156111d557600080fd5b6111de88611156565b96506020880135955060408801356001600160401b0381111561120057600080fd5b61120c8a828b01611172565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561124057600080fd5b81356001600160e01b03198116811461087057600080fd5b60008060008060008060a0878903121561127157600080fd5b61127a87611156565b95506020870135945060408701356001600160401b0381111561129c57600080fd5b6112a889828a01611172565b979a9699509760608101359660809091013595509350505050565b6000602082840312156112d557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561131a5761131a6112dc565b604052919050565b600082601f83011261133357600080fd5b81356001600160401b0381111561134c5761134c6112dc565b61135f601f8201601f19166020016112f2565b81815284602083860101111561137457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113a757600080fd5b6113b085611156565b93506113be60208601611156565b92506040850135915060608501356001600160401b038111156113e057600080fd5b6113ec87828801611322565b91505092959194509250565b6000806040838503121561140b57600080fd5b8235915061141b60208401611156565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061145c57634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f84011261147457600080fd5b5081356001600160401b0381111561148b57600080fd5b6020830191508360208260051b85010111156111b357600080fd5b600080600080600080600080600060c08a8c0312156114c457600080fd5b89356001600160401b03808211156114db57600080fd5b6114e78d838e01611462565b909b50995060208c013591508082111561150057600080fd5b61150c8d838e01611462565b909950975060408c013591508082111561152557600080fd5b506115328c828d01611462565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561157357600080fd5b88356001600160401b038082111561158a57600080fd5b6115968c838d01611462565b909a50985060208b01359150808211156115af57600080fd5b6115bb8c838d01611462565b909850965060408b01359150808211156115d457600080fd5b506115e18b828c01611462565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261161057600080fd5b813560206001600160401b0382111561162b5761162b6112dc565b8160051b61163a8282016112f2565b928352848101820192828101908785111561165457600080fd5b83870192505b848310156116735782358252918301919083019061165a565b979650505050505050565b600080600080600060a0868803121561169657600080fd5b61169f86611156565b94506116ad60208701611156565b935060408601356001600160401b03808211156116c957600080fd5b6116d589838a016115ff565b945060608801359150808211156116eb57600080fd5b6116f789838a016115ff565b9350608088013591508082111561170d57600080fd5b5061171a88828901611322565b9150509295509295909350565b600080600080600060a0868803121561173f57600080fd5b61174886611156565b945061175660208701611156565b9350604086013592506060860135915060808601356001600160401b0381111561177f57600080fd5b61171a88828901611322565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a0604082015260006117dc60a08301868861178b565b60608301949094525060800152949350505050565b60018060a01b038516815283602082015260606040820152600061181960608301848661178b565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561184b57600080fd5b61087082611156565b6000808335601e1984360301811261186b57600080fd5b8301803591506001600160401b0382111561188557600080fd5b6020019150368190038213156111b357600080fd5b6000838385526020808601955060208560051b8301018460005b8781101561192357848303601f19018952813536889003601e190181126118da57600080fd5b870184810190356001600160401b038111156118f557600080fd5b80360382131561190457600080fd5b61190f85828461178b565b9a86019a94505050908301906001016118b4565b5090979650505050505050565b60a0808252810188905260008960c08301825b8b811015611971576001600160a01b0361195c84611156565b16825260209283019290910190600101611943565b5083810360208501528881526001600160fb1b0389111561199157600080fd5b8860051b9150818a602083013701828103602090810160408501526119b9908201878961189a565b60608401959095525050608001529695505050505050565b808201808211156106bf57634e487b7160e01b600052601160045260246000fd5b818382376000910190815291905056fea2646970667358221220d82d80986c3afa2dc55fdf8ff5c77f0b1f8dcd17e320484434a202763974ab0a64736f6c63430008180033000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d390000000000000000000000000000000000000000000000000000000000000002000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b9130000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39" + }, + { + "transactionType": "CREATE", + "address": "0x73246a05ee4ff05666f1e7d527b69e5199183000", + "initCode": "0x608060405234801561001057600080fd5b5060405161052438038061052483398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610427806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea26469706673582212201703533f29590eff0666c4709b70252f4fc26ba8c4bd3a4d3515b180c659bc1664736f6c6343000818003300000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe" + } + ], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x1ad2d", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x13788e059d89528a773de059dc043d716fa0f83654b807fccc8370e3d5314579", + "transactionIndex": "0x0", + "blockHash": "0xee716cadee427af0b5e7dc3c5ff9b1a5d7751d1867de2245ecd2f03450e6de93", + "blockNumber": "0x21b5ee", + "gasUsed": "0x1ad2d", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0x1c39ba375fab6a9f6e0c01b9f49d488e101c2011", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x31c824", + "logs": [ + { + "address": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "blockHash": "0x67d00e3ffcf3a166fdd8db588270cbc7cd432cca53cceda59fcd3b1779e3df55", + "blockNumber": "0x21b5ef", + "blockTimestamp": "0x66cc6248", + "transactionHash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008010000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x49163a5fe1968cace90f64a01d38ed057ac97903d0919ded89c78665a1fc1f2b", + "transactionIndex": "0x0", + "blockHash": "0x67d00e3ffcf3a166fdd8db588270cbc7cd432cca53cceda59fcd3b1779e3df55", + "blockNumber": "0x21b5ef", + "gasUsed": "0x31c824", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0xb04cb6c52e73cf3e2753776030ce85a36549c9c2", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x3ca3c3", + "logs": [ + { + "address": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xfd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63", + "0x000000000000000000000000743b91cdb1c694d4f51bcda3a4a59dcc0d02b913", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63", + "0x0000000000000000000000009dd8f69b62ddfd990241530f47dced0dad7f7d39", + "0x000000000000000000000000c0c5618f0f3fa66b496f2940f373dc366d765bae" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x71ee2ebf3eb67e1536b9d861c40eed655523ccbe", + "topics": [ + "0x11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x73246a05ee4ff05666f1e7d527b69e5199183000", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000071ee2ebf3eb67e1536b9d861c40eed655523ccbe" + ], + "data": "0x", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "blockTimestamp": "0x66cc6249", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "logIndex": "0xa", + "removed": false + } + ], + "logsBloom": "0x00000084000000000000000000000400020000000000000000800000000000800000000000000004000000000001000000400000000000000200000010200000000000000000000000000010000002004081000000000000000000000800000000000000020000000000000100000800000000040000000000020000000000400000000000000000000020000002000000000000000000080000000000000000000800000022000000004000000000000000000000000008001000000000080000000000000000204000000000000000000000002000000100000101200020000000000000000400000000000000000000000000000000000000000000400000", + "type": "0x2", + "transactionHash": "0xfc6e95e9f1a9cdb342a624e7b40d2d0a2f435ebec263e8e3fb40e420fc45dc43", + "transactionIndex": "0x0", + "blockHash": "0xb1b2c68a93a5d42ee9cd04ea7d83a8549b55f4b7838fcc1321e2355ed3544942", + "blockNumber": "0x21b5f0", + "gasUsed": "0x3ca3c3", + "effectiveGasPrice": "0xb46d20c", + "blobGasPrice": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0xc0c5618f0f3fa66b496f2940f373dc366d765bae", + "root": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1724670724, + "chain": 17000, + "commit": "eb5e562" +} \ No newline at end of file diff --git a/script/Actors.sol b/script/Actors.sol index a533bcb..abc5730 100644 --- a/script/Actors.sol +++ b/script/Actors.sol @@ -1,7 +1,18 @@ // SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.24; +pragma solidity ^0.8.24; + +interface IActors { + function ADMIN() external view returns (address); + function OPERATOR() external view returns (address); + function UNAUTHORIZED() external view returns (address); + function PROPOSER_1() external view returns (address); + function PROPOSER_2() external view returns (address); + function EXECUTOR_1() external view returns (address); + function EXECUTOR_2() external view returns (address); +} -contract LocalActors { +contract LocalActors is IActors { address public constant ADMIN = address(1); address public constant OPERATOR = address(2); address public constant UNAUTHORIZED = address(3); @@ -12,3 +23,27 @@ contract LocalActors { address public constant EXECUTOR_1 = address(3); address public constant EXECUTOR_2 = address(4); } + +contract AnvilActors is IActors { + address public constant ADMIN = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + address public constant OPERATOR = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + address public constant UNAUTHORIZED = address(0); + + address public constant PROPOSER_1 = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + address public constant PROPOSER_2 = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + address public constant EXECUTOR_1 = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + address public constant EXECUTOR_2 = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; +} + +contract HoleskyActors is IActors { + address public constant ADMIN = 0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913; + address public constant OPERATOR = 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39; + address public constant UNAUTHORIZED = address(0); + + address public constant PROPOSER_1 = 0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913; + address public constant PROPOSER_2 = 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39; + + address public constant EXECUTOR_1 = 0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913; + address public constant EXECUTOR_2 = 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39; +} diff --git a/script/DeployVaultFactory.sol b/script/DeployVaultFactory.sol new file mode 100644 index 0000000..1c8d85f --- /dev/null +++ b/script/DeployVaultFactory.sol @@ -0,0 +1,47 @@ +pragma solidity ^0.8.24; + +import "lib/forge-std/src/Script.sol"; + +import {VaultFactory} from "src/VaultFactory.sol"; +import {AnvilActors,HoleskyActors,IActors} from "script/Actors.sol"; +import {SingleVault} from "src/SingleVault.sol"; + +contract DeployVaultFactory is Script { + + function run() public { + + if (block.chainid == 31337) { + vm.startBroadcast(); + AnvilActors actors = new AnvilActors(); + uint256 minDelay = 10; // seconds + deployVaultFactory(actors, minDelay); + } + + if (block.chainid == 17000) { + vm.startBroadcast(); + HoleskyActors actors = new HoleskyActors(); + uint256 minDelay = 10; // seconds + deployVaultFactory(actors, minDelay); + } + + if (block.chainid == 1) { + // TODO + } + } + + function deployVaultFactory(IActors actors, uint256 minDelay) internal { + address singleVaultImpl = address(new SingleVault()); + + address[] memory proposers = new address[](2); + proposers[0] = actors.PROPOSER_1(); + proposers[1] = actors.PROPOSER_2(); + + address[] memory executors = new address[](2); + executors[0] = actors.EXECUTOR_1(); + executors[1] = actors.EXECUTOR_2(); + + address admin = actors.ADMIN(); + + new VaultFactory(singleVaultImpl, proposers, executors, minDelay, admin); + } +} diff --git a/src/Common.sol b/src/Common.sol index c15bdab..6fa4798 100644 --- a/src/Common.sol +++ b/src/Common.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.24; import {IERC20} from "lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol"; - import {ProxyAdmin} from "lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; From 2623da64a3343134116efa2877d65fee46b5e96e Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:27:23 +0800 Subject: [PATCH 05/16] Update Readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34fac15..cfcf4f4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ ## YieldNest Vault -This is a general purpose starter vault for rapid deployment against new opportunies. +This is a general purpose starter vault for rapid deployment against new opportunies. + +## Overview + +The initial version is a SingleAsset 4626 vault that is a TimelockController to send arbitrary transactions. ## Test Deployment From b52178289dc95f947ac8d398f3f88c471dbe0b80 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:28:50 +0800 Subject: [PATCH 06/16] Format --- script/DeployVaultFactory.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/script/DeployVaultFactory.sol b/script/DeployVaultFactory.sol index 1c8d85f..7448f73 100644 --- a/script/DeployVaultFactory.sol +++ b/script/DeployVaultFactory.sol @@ -3,20 +3,18 @@ pragma solidity ^0.8.24; import "lib/forge-std/src/Script.sol"; import {VaultFactory} from "src/VaultFactory.sol"; -import {AnvilActors,HoleskyActors,IActors} from "script/Actors.sol"; +import {AnvilActors, HoleskyActors, IActors} from "script/Actors.sol"; import {SingleVault} from "src/SingleVault.sol"; contract DeployVaultFactory is Script { - function run() public { - if (block.chainid == 31337) { vm.startBroadcast(); AnvilActors actors = new AnvilActors(); uint256 minDelay = 10; // seconds deployVaultFactory(actors, minDelay); } - + if (block.chainid == 17000) { vm.startBroadcast(); HoleskyActors actors = new HoleskyActors(); From d950c58a85c6bb32e13a9de3d12c88d48fb41c9c Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:34:18 +0800 Subject: [PATCH 07/16] Adds bsd licence to script --- script/DeployVaultFactory.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/script/DeployVaultFactory.sol b/script/DeployVaultFactory.sol index 7448f73..854ee3d 100644 --- a/script/DeployVaultFactory.sol +++ b/script/DeployVaultFactory.sol @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.24; import "lib/forge-std/src/Script.sol"; From cc5a3250841e74734903ac4274067df88d2d541b Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:44:41 +0800 Subject: [PATCH 08/16] Adds netspec to vault --- src/SingleVault.sol | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/SingleVault.sol b/src/SingleVault.sol index 0da9945..aa21706 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -18,7 +18,17 @@ contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgr _disableInitializers(); } - /// @inheritdoc ISingleVault + /** + * @dev Initializes the SingleVault contract. + * @param asset_ The address of the ERC20 asset. + * @param name_ The name of the ERC20 asset. + * @param symbol_ The symbol of the ERC20 asset. + * @param admin_ The address of the admin. + * @param operator_ The address of the operator. + * @param minDelay_ The minimum delay for timelock. + * @param proposers_ The addresses of the proposers. + * @param executors_ The addresses of the executors. + */ function initialize( IERC20 asset_, string memory name_, From b469c5b46a4d9c2c8bd9d8d36a5181e1bc13bc28 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 26 Aug 2024 19:45:40 +0800 Subject: [PATCH 09/16] Fix natspec mistake --- src/SingleVault.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SingleVault.sol b/src/SingleVault.sol index aa21706..f012bbd 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -21,8 +21,8 @@ contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgr /** * @dev Initializes the SingleVault contract. * @param asset_ The address of the ERC20 asset. - * @param name_ The name of the ERC20 asset. - * @param symbol_ The symbol of the ERC20 asset. + * @param name_ The name of the vault. + * @param symbol_ The symbol of the vault. * @param admin_ The address of the admin. * @param operator_ The address of the operator. * @param minDelay_ The minimum delay for timelock. From 359aa128d86868ece4dd9f16b2c283a263131935 Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 14:28:37 +0800 Subject: [PATCH 10/16] Remove redundant ProxyAdmin from factory, operator role --- Makefile | 4 +--- src/ISingleVault.sol | 8 +++++++- src/SingleVault.sol | 26 ++++++++++---------------- src/VaultFactory.sol | 17 ++++++++--------- test/factory/create.t.sol | 14 +++----------- test/single/access.t.sol | 13 ++++++------- test/single/admin.t.sol | 1 - test/single/deposit.t.sol | 1 - test/single/initialize.t.sol | 5 +---- test/single/withdraw.t.sol | 1 - 10 files changed, 36 insertions(+), 54 deletions(-) diff --git a/Makefile b/Makefile index f6ca83f..9348c88 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,4 @@ account :; cast wallet import $(ACCOUNT_NAME) --interactive factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ --account $(ACCOUNT_NAME) \ --rpc-url $(RPC_URL) \ - --broadcast \ - --etherscan-api-key $(ETHERSCAN_KEY) \ - --verify \ No newline at end of file + --broadcast \ No newline at end of file diff --git a/src/ISingleVault.sol b/src/ISingleVault.sol index 302b95a..c4b3881 100644 --- a/src/ISingleVault.sol +++ b/src/ISingleVault.sol @@ -4,12 +4,18 @@ pragma solidity ^0.8.24; import {IERC20, IERC4626, IAccessControl} from "src/Common.sol"; interface ISingleVault is IERC20, IERC4626, IAccessControl { + error AssetZeroAddress(); + error NameEmpty(); + error SymbolEmpty(); + error AdminZeroAddress(); + error ProposersEmpty(); + error ExecutorsEmpty(); + function initialize( IERC20 asset_, string memory name_, string memory symbol_, address admin_, - address operator_, uint256 minDelay_, address[] calldata proposers_, address[] calldata executors_ diff --git a/src/SingleVault.sol b/src/SingleVault.sol index f012bbd..81bfe90 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -6,13 +6,14 @@ import { AccessControlUpgradeable, ReentrancyGuardUpgradeable, TimelockControllerUpgradeable, - IERC20 + IERC20, + IERC4626 } from "src/Common.sol"; import {ISingleVault} from "src/ISingleVault.sol"; + contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgradeable, ReentrancyGuardUpgradeable { - bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); constructor() { _disableInitializers(); @@ -24,7 +25,6 @@ contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgr * @param name_ The name of the vault. * @param symbol_ The symbol of the vault. * @param admin_ The address of the admin. - * @param operator_ The address of the operator. * @param minDelay_ The minimum delay for timelock. * @param proposers_ The addresses of the proposers. * @param executors_ The addresses of the executors. @@ -34,21 +34,17 @@ contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgr string memory name_, string memory symbol_, address admin_, - address operator_, uint256 minDelay_, address[] calldata proposers_, address[] calldata executors_ ) public initializer { - _verifyParamsAreValid(asset_, name_, symbol_, admin_, operator_, proposers_, executors_); - + _verifyParamsAreValid(asset_, name_, symbol_, admin_, proposers_, executors_); __TimelockController_init(minDelay_, proposers_, executors_, admin_); __ERC20_init(name_, symbol_); __ERC4626_init(asset_); __AccessControl_init(); __ReentrancyGuard_init(); - _grantRole(DEFAULT_ADMIN_ROLE, admin_); - _grantRole(OPERATOR_ROLE, operator_); } function _verifyParamsAreValid( @@ -56,16 +52,14 @@ contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgr string memory name_, string memory symbol_, address admin_, - address operator_, address[] memory proposers_, address[] memory executors_ ) internal pure { - require(asset_ != IERC20(address(0)), "Asset cannot be zero address"); - require(bytes(name_).length > 0, "Name cannot be empty"); - require(bytes(symbol_).length > 0, "Symbol cannot be empty"); - require(admin_ != address(0), "Admin cannot be zero address"); - require(operator_ != address(0), "Operator cannot be zero address"); - require(proposers_.length > 0, "Proposers cannot be empty"); - require(executors_.length > 0, "Executors cannot be empty"); + if (asset_ == IERC20(address(0))) revert AssetZeroAddress(); + if (bytes(name_).length == 0) revert NameEmpty(); + if (bytes(symbol_).length == 0) revert SymbolEmpty(); + if (admin_ == address(0)) revert AdminZeroAddress(); + if (proposers_.length == 0) revert ProposersEmpty(); + if (executors_.length == 0) revert ExecutorsEmpty(); } } diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index 8f4a831..106c323 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -12,7 +12,6 @@ import { contract VaultFactory is AccessControlUpgradeable { string public constant version = "0.1.0"; - ProxyAdmin public proxyAdmin; TimelockController public timelock; address public singleVaultImpl; @@ -20,6 +19,7 @@ contract VaultFactory is AccessControlUpgradeable { struct Vault { address vault; + address timelock; string name; string symbol; VaultType vaultType; @@ -54,8 +54,10 @@ contract VaultFactory is AccessControlUpgradeable { address admin ) { _grantRole(DEFAULT_ADMIN_ROLE, admin); + // NOTES: There are two timelocks. This timelock is for vault upgrades but + // the vault is the second timelock controller, which has the same proposers and executors + // as the proxy admins timelock = new TimelockController(minDelay, proposers, executors, admin); - proxyAdmin = new ProxyAdmin(address(timelock)); singleVaultImpl = singleVaultImpl_; } @@ -65,7 +67,6 @@ contract VaultFactory is AccessControlUpgradeable { * @param name_ The name of the vault. * @param symbol_ The symbol of the vault. * @param admin_ The address of the admin. - * @param operator_ The address of the operator. * @param minDelay_ The timelock delay for transactions. * @param proposers_ Array of transaction proposers. * @param executors_ Array of transaction executors. @@ -76,24 +77,22 @@ contract VaultFactory is AccessControlUpgradeable { string memory name_, string memory symbol_, address admin_, - address operator_, uint256 minDelay_, address[] memory proposers_, address[] memory executors_ ) public onlyRole(DEFAULT_ADMIN_ROLE) returns (address) { if (vaults[symbol_].vault != address(0)) revert SymbolUsed(); - string memory funcSig = "initialize(address,string,string,address,address,uint256,address[],address[])"; + string memory funcSig = "initialize(address,string,string,address,uint256,address[],address[])"; TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( singleVaultImpl, - address(proxyAdmin), + address(timelock), abi.encodeWithSignature( - funcSig, asset_, name_, symbol_, admin_, operator_, minDelay_, proposers_, executors_ + funcSig, asset_, name_, symbol_, admin_, minDelay_, proposers_, executors_ ) ); - - vaults[symbol_] = Vault(address(proxy), name_, symbol_, VaultType.SingleAsset); + vaults[symbol_] = Vault(address(proxy), address(timelock), name_, symbol_, VaultType.SingleAsset); emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); return address(proxy); } diff --git a/test/factory/create.t.sol b/test/factory/create.t.sol index 0e71346..1e58464 100644 --- a/test/factory/create.t.sol +++ b/test/factory/create.t.sol @@ -28,8 +28,8 @@ contract CreateTest is Test, LocalActors, TestConstants { function testCreateSingleVault() public { vm.startPrank(ADMIN); address vault = - factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR, minDelay, proposers, executors); - (address vaultAddress,,,) = factory.vaults(VAULT_SYMBOL); + factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, minDelay, proposers, executors); + (address vaultAddress,,,,) = factory.vaults(VAULT_SYMBOL); assertEq(vaultAddress, vault, "Vault address should match the expected address"); } @@ -37,16 +37,8 @@ contract CreateTest is Test, LocalActors, TestConstants { assertTrue(factory.hasRole(factory.DEFAULT_ADMIN_ROLE(), ADMIN)); } - function testProxyOwner() public view { - ProxyAdmin proxyAdmin = ProxyAdmin(factory.proxyAdmin()); - address proxyOwner = proxyAdmin.owner(); - address timelock = address(factory.timelock()); - - assertEq(proxyOwner, timelock); - } - function skip_testCreateSingleVaultRevertsIfNotAdmin() public { vm.expectRevert(abi.encodeWithSelector(bytes4(keccak256("AccessControl: must have admin role")))); - factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, OPERATOR, minDelay, proposers, executors); + factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, minDelay, proposers, executors); } } diff --git a/test/single/access.t.sol b/test/single/access.t.sol index 7ffd7f9..520d575 100644 --- a/test/single/access.t.sol +++ b/test/single/access.t.sol @@ -24,7 +24,6 @@ contract AccessControlTest is Test, LocalActors, TestConstants { VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, // time delay deployFactory.getProposers(), deployFactory.getExecutors() @@ -38,8 +37,8 @@ contract AccessControlTest is Test, LocalActors, TestConstants { function testAdminCanGrantRole() public { vm.startPrank(ADMIN); - vault.grantRole(vault.OPERATOR_ROLE(), OPERATOR); - assertEq(vault.hasRole(vault.OPERATOR_ROLE(), OPERATOR), true); + vault.grantRole(vault.DEFAULT_ADMIN_ROLE(), OPERATOR); + assertEq(vault.hasRole(vault.DEFAULT_ADMIN_ROLE(), OPERATOR), true); } function skip_testNonAdminCannotGrantRole() public { @@ -49,13 +48,13 @@ contract AccessControlTest is Test, LocalActors, TestConstants { IAccessControl.AccessControlUnauthorizedAccount.selector, UNAUTHORIZED, vault.DEFAULT_ADMIN_ROLE() ) ); - vault.grantRole(vault.OPERATOR_ROLE(), address(4)); + vault.grantRole(vault.DEFAULT_ADMIN_ROLE(), address(4)); } function testAdminCanRevokeRole() public { vm.startPrank(ADMIN); - vault.revokeRole(vault.OPERATOR_ROLE(), OPERATOR); - assertFalse(vault.hasRole(vault.OPERATOR_ROLE(), OPERATOR)); + vault.revokeRole(vault.DEFAULT_ADMIN_ROLE(), OPERATOR); + assertFalse(vault.hasRole(vault.DEFAULT_ADMIN_ROLE(), OPERATOR)); } function skip_testNonAdminCannotRevokeRole() public { @@ -65,6 +64,6 @@ contract AccessControlTest is Test, LocalActors, TestConstants { IAccessControl.AccessControlUnauthorizedAccount.selector, UNAUTHORIZED, vault.DEFAULT_ADMIN_ROLE() ) ); - vault.revokeRole(vault.OPERATOR_ROLE(), OPERATOR); + vault.revokeRole(vault.DEFAULT_ADMIN_ROLE(), OPERATOR); } } diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol index 14b02c8..d0479bb 100644 --- a/test/single/admin.t.sol +++ b/test/single/admin.t.sol @@ -32,7 +32,6 @@ contract TimelockTest is Test, LocalActors, TestConstants { VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, // admin tx time delay deployFactory.getProposers(), deployFactory.getExecutors() diff --git a/test/single/deposit.t.sol b/test/single/deposit.t.sol index 6431edd..37364bb 100644 --- a/test/single/deposit.t.sol +++ b/test/single/deposit.t.sol @@ -24,7 +24,6 @@ contract DepositTest is Test, LocalActors, TestConstants { VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, // time delay deployFactory.getProposers(), deployFactory.getExecutors() diff --git a/test/single/initialize.t.sol b/test/single/initialize.t.sol index aa48ac3..ed86000 100644 --- a/test/single/initialize.t.sol +++ b/test/single/initialize.t.sol @@ -27,7 +27,6 @@ contract InitializeTest is Test, LocalActors, TestConstants { VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, // time delay deployFactory.getProposers(), deployFactory.getExecutors() @@ -41,12 +40,11 @@ contract InitializeTest is Test, LocalActors, TestConstants { address(vaultImplementation), address(this), abi.encodeWithSignature( - "initialize(address,string,string,address,address,uint256,address[],address[])", + "initialize(address,string,string,address,uint256,address[],address[])", asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, deployFactory.getProposers(), deployFactory.getExecutors() @@ -56,7 +54,6 @@ contract InitializeTest is Test, LocalActors, TestConstants { ISingleVault newVault = ISingleVault(address(proxy)); assertEq(newVault.asset(), address(asset)); - assertEq(newVault.hasRole(vault.OPERATOR_ROLE(), OPERATOR), true); assertEq(newVault.hasRole(vault.DEFAULT_ADMIN_ROLE(), ADMIN), true); assertEq(newVault.symbol(), VAULT_SYMBOL); assertEq(newVault.name(), VAULT_NAME); diff --git a/test/single/withdraw.t.sol b/test/single/withdraw.t.sol index 5becd28..c263ac3 100644 --- a/test/single/withdraw.t.sol +++ b/test/single/withdraw.t.sol @@ -26,7 +26,6 @@ contract WithdrawTest is Test, LocalActors, TestConstants { VAULT_NAME, VAULT_SYMBOL, ADMIN, - OPERATOR, 0, // admin tx time delay deployFactory.getProposers(), deployFactory.getExecutors() From 240a29014793060627a7fdf077da22b2c6795b0f Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 15:08:49 +0800 Subject: [PATCH 11/16] Updates makefile --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9348c88..eb1fdc5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,18 @@ account :; cast wallet import $(ACCOUNT_NAME) --interactive -factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ +local-factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ + --private-key $(PRIVATE_KEY) \ + --rpc-url $(RPC_URL) \ + --broadcast + +deploy-factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ --account $(ACCOUNT_NAME) \ --rpc-url $(RPC_URL) \ - --broadcast \ No newline at end of file + --etherscan-api-key $(ETHERSCAN_KEY) \ + --verify \ + --broadcast + + + + \ No newline at end of file From cbb525d5a0cea259641105a68461615ee33f45c9 Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 16:08:55 +0800 Subject: [PATCH 12/16] forge fmt --- src/SingleVault.sol | 2 -- src/VaultFactory.sol | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SingleVault.sol b/src/SingleVault.sol index 81bfe90..5652333 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -12,9 +12,7 @@ import { import {ISingleVault} from "src/ISingleVault.sol"; - contract SingleVault is ISingleVault, ERC4626Upgradeable, TimelockControllerUpgradeable, ReentrancyGuardUpgradeable { - constructor() { _disableInitializers(); } diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index 106c323..8da1aa4 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -88,9 +88,7 @@ contract VaultFactory is AccessControlUpgradeable { TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( singleVaultImpl, address(timelock), - abi.encodeWithSignature( - funcSig, asset_, name_, symbol_, admin_, minDelay_, proposers_, executors_ - ) + abi.encodeWithSignature(funcSig, asset_, name_, symbol_, admin_, minDelay_, proposers_, executors_) ); vaults[symbol_] = Vault(address(proxy), address(timelock), name_, symbol_, VaultType.SingleAsset); emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); From 2b87567d3e46badaaa923635fab75732c532b195 Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 18:13:35 +0800 Subject: [PATCH 13/16] Clean up, format, add KERNEL_VAULT actor --- Makefile | 4 ++-- README.md | 5 ++--- script/Actors.sol | 7 +++++++ script/{DeployVaultFactory.sol => Deploy.s.sol} | 0 solhint.json | 5 ----- src/SingleVault.sol | 3 +-- test/single/admin.t.sol | 13 +++---------- 7 files changed, 15 insertions(+), 22 deletions(-) rename script/{DeployVaultFactory.sol => Deploy.s.sol} (100%) delete mode 100644 solhint.json diff --git a/Makefile b/Makefile index eb1fdc5..3122ed5 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,12 @@ account :; cast wallet import $(ACCOUNT_NAME) --interactive -local-factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ +local-factory :; forge script script/Deploy.s.sol:DeployVaultFactory \ --private-key $(PRIVATE_KEY) \ --rpc-url $(RPC_URL) \ --broadcast -deploy-factory :; forge script script/DeployVaultFactory.sol:DeployVaultFactory \ +deploy-factory :; forge script script/Deploy.s.sol:DeployVaultFactory \ --account $(ACCOUNT_NAME) \ --rpc-url $(RPC_URL) \ --etherscan-api-key $(ETHERSCAN_KEY) \ diff --git a/README.md b/README.md index cfcf4f4..93bc996 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ ## YieldNest Vault - This is a general purpose starter vault for rapid deployment against new opportunies. ## Overview -The initial version is a SingleAsset 4626 vault that is a TimelockController to send arbitrary transactions. - +The initial version is a SingleAsset 4626 Vault with TimelockController to send Admin transactions. +This vault is the Base version used for pre-depositing assets ahead of settled DeFi functionality. ## Test Deployment diff --git a/script/Actors.sol b/script/Actors.sol index abc5730..1ff2b2a 100644 --- a/script/Actors.sol +++ b/script/Actors.sol @@ -10,6 +10,7 @@ interface IActors { function PROPOSER_2() external view returns (address); function EXECUTOR_1() external view returns (address); function EXECUTOR_2() external view returns (address); + function KERNEL_VAULT() external view returns (address); } contract LocalActors is IActors { @@ -22,6 +23,8 @@ contract LocalActors is IActors { address public constant EXECUTOR_1 = address(3); address public constant EXECUTOR_2 = address(4); + + address public constant KERNEL_VAULT = address(420); } contract AnvilActors is IActors { @@ -34,6 +37,8 @@ contract AnvilActors is IActors { address public constant EXECUTOR_1 = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; address public constant EXECUTOR_2 = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + address public constant KERNEL_VAULT = address(420); } contract HoleskyActors is IActors { @@ -46,4 +51,6 @@ contract HoleskyActors is IActors { address public constant EXECUTOR_1 = 0x743b91CDB1C694D4F51bCDA3a4A59DcC0d02b913; address public constant EXECUTOR_2 = 0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39; + + address public constant KERNEL_VAULT = address(420); } diff --git a/script/DeployVaultFactory.sol b/script/Deploy.s.sol similarity index 100% rename from script/DeployVaultFactory.sol rename to script/Deploy.s.sol diff --git a/solhint.json b/solhint.json deleted file mode 100644 index 921562a..0000000 --- a/solhint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "max-line-length": "off" - } -} diff --git a/src/SingleVault.sol b/src/SingleVault.sol index 5652333..9978c8b 100644 --- a/src/SingleVault.sol +++ b/src/SingleVault.sol @@ -6,8 +6,7 @@ import { AccessControlUpgradeable, ReentrancyGuardUpgradeable, TimelockControllerUpgradeable, - IERC20, - IERC4626 + IERC20 } from "src/Common.sol"; import {ISingleVault} from "src/ISingleVault.sol"; diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol index d0479bb..42571d5 100644 --- a/test/single/admin.t.sol +++ b/test/single/admin.t.sol @@ -14,13 +14,6 @@ contract TimelockTest is Test, LocalActors, TestConstants { SingleVault public vault; IERC20 public asset; - enum OperationState { - Unset, - Waiting, - Ready, - Done - } - function setUp() public { vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); @@ -49,7 +42,7 @@ contract TimelockTest is Test, LocalActors, TestConstants { // schedule a transaction address target = address(asset); uint256 value = 0; - bytes memory data = abi.encodeWithSelector(IERC20.transfer.selector, ADMIN, shares); + bytes memory data = abi.encodeWithSelector(IERC20.transfer.selector, KERNEL_VAULT, shares); bytes32 predecessor = bytes32(0); bytes32 salt = keccak256("chad"); uint256 delay = 1; @@ -68,14 +61,14 @@ contract TimelockTest is Test, LocalActors, TestConstants { assertEq(vault.isOperationDone(id), false); assertEq(vault.isOperation(id), true); - uint256 previousBalance = asset.balanceOf(ADMIN); + uint256 previousBalance = asset.balanceOf(KERNEL_VAULT); //execute the transaction vm.warp(10); vm.startPrank(EXECUTOR_1); vault.execute(target, value, data, predecessor, salt); - uint256 currentBalance = asset.balanceOf(ADMIN); + uint256 currentBalance = asset.balanceOf(KERNEL_VAULT); uint256 expectedBalance = currentBalance - previousBalance; // // Verify the transaction was executed successfully From dcee01005a4f8b1db241689204a2506feb3e3bfe Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 18:39:22 +0800 Subject: [PATCH 14/16] Add boostrap in Factory to prevent donation attack --- src/VaultFactory.sol | 8 +++++++- test/factory/create.t.sol | 4 +++- test/single/access.t.sol | 4 +++- test/single/admin.t.sol | 3 ++- test/single/deposit.t.sol | 9 +++++---- test/single/initialize.t.sol | 3 ++- test/single/withdraw.t.sol | 7 ++++--- 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index 8da1aa4..d489894 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -6,7 +6,8 @@ import { TransparentUpgradeableProxy, TimelockController, ProxyAdmin, - IERC20 + IERC20, + IERC4626 } from "src/Common.sol"; contract VaultFactory is AccessControlUpgradeable { @@ -91,6 +92,11 @@ contract VaultFactory is AccessControlUpgradeable { abi.encodeWithSignature(funcSig, asset_, name_, symbol_, admin_, minDelay_, proposers_, executors_) ); vaults[symbol_] = Vault(address(proxy), address(timelock), name_, symbol_, VaultType.SingleAsset); + + // bootstrap 1 ether of underlying to prevent donation attacks + IERC20(asset_).approve(address(proxy), 1 ether); + IERC4626(address(proxy)).deposit(1 ether, address(this)); + emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); return address(proxy); } diff --git a/test/factory/create.t.sol b/test/factory/create.t.sol index 1e58464..5296b75 100644 --- a/test/factory/create.t.sol +++ b/test/factory/create.t.sol @@ -17,6 +17,7 @@ contract CreateTest is Test, LocalActors, TestConstants { address[] executors; function setUp() public { + vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); proposers = [PROPOSER_1, PROPOSER_2]; executors = [EXECUTOR_1, EXECUTOR_2]; @@ -26,7 +27,8 @@ contract CreateTest is Test, LocalActors, TestConstants { } function testCreateSingleVault() public { - vm.startPrank(ADMIN); + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vault = factory.createSingleVault(asset, VAULT_NAME, VAULT_SYMBOL, ADMIN, minDelay, proposers, executors); (address vaultAddress,,,,) = factory.vaults(VAULT_SYMBOL); diff --git a/test/single/access.t.sol b/test/single/access.t.sol index 520d575..ff0a081 100644 --- a/test/single/access.t.sol +++ b/test/single/access.t.sol @@ -16,9 +16,11 @@ contract AccessControlTest is Test, LocalActors, TestConstants { function setUp() public { vm.startPrank(ADMIN); asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); + DeployFactory deployFactory = new DeployFactory(); VaultFactory factory = deployFactory.deploy(0); - + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vaultAddress = factory.createSingleVault( asset, VAULT_NAME, diff --git a/test/single/admin.t.sol b/test/single/admin.t.sol index 42571d5..dd2db06 100644 --- a/test/single/admin.t.sol +++ b/test/single/admin.t.sol @@ -19,7 +19,8 @@ contract TimelockTest is Test, LocalActors, TestConstants { asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); DeployFactory deployFactory = new DeployFactory(); VaultFactory factory = deployFactory.deploy(0); - + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vaultAddress = factory.createSingleVault( asset, VAULT_NAME, diff --git a/test/single/deposit.t.sol b/test/single/deposit.t.sol index 37364bb..723502c 100644 --- a/test/single/deposit.t.sol +++ b/test/single/deposit.t.sol @@ -18,7 +18,8 @@ contract DepositTest is Test, LocalActors, TestConstants { asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); DeployFactory deployFactory = new DeployFactory(); VaultFactory factory = deployFactory.deploy(0); - + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vaultAddress = factory.createSingleVault( asset, VAULT_NAME, @@ -38,9 +39,9 @@ contract DepositTest is Test, LocalActors, TestConstants { uint256 shares = vault.deposit(amount, ADMIN); assertEq(shares, amount, "Shares should be equal to the amount deposited"); assertEq(vault.balanceOf(ADMIN), shares, "Balance of the user should be updated"); - assertEq(asset.balanceOf(address(vault)), amount, "Vault should have received the asset"); - assertEq(vault.totalAssets(), amount, "Vault totalAsset should be amount deposited"); - assertEq(vault.totalSupply(), amount, "Vault totalSupply should be amount deposited"); + assertEq(asset.balanceOf(address(vault)), amount + 1 ether, "Vault should have received the asset"); + assertEq(vault.totalAssets(), amount + 1 ether, "Vault totalAsset should be amount deposited"); + assertEq(vault.totalSupply(), amount + 1 ether, "Vault totalSupply should be amount deposited"); } function skip_testDepositRevertsIfNotApproved() public { diff --git a/test/single/initialize.t.sol b/test/single/initialize.t.sol index ed86000..74945c5 100644 --- a/test/single/initialize.t.sol +++ b/test/single/initialize.t.sol @@ -21,7 +21,8 @@ contract InitializeTest is Test, LocalActors, TestConstants { asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); deployFactory = new DeployFactory(); factory = deployFactory.deploy(0); - + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vaultAddress = factory.createSingleVault( asset, VAULT_NAME, diff --git a/test/single/withdraw.t.sol b/test/single/withdraw.t.sol index c263ac3..71f9458 100644 --- a/test/single/withdraw.t.sol +++ b/test/single/withdraw.t.sol @@ -20,7 +20,8 @@ contract WithdrawTest is Test, LocalActors, TestConstants { asset = IERC20(address(new MockERC20(ASSET_NAME, ASSET_SYMBOL))); DeployFactory deployFactory = new DeployFactory(); VaultFactory factory = deployFactory.deploy(0); - + asset.approve(address(factory), 1 ether); + asset.transfer(address(factory), 1 ether); address vaultAddress = factory.createSingleVault( asset, VAULT_NAME, @@ -49,8 +50,8 @@ contract WithdrawTest is Test, LocalActors, TestConstants { assertEq(assetsReceived, expectedAssets, "Assets received should be equal to the expected amount"); assertEq(newNetBalance, expectedAssets, "User should have received the expected amount of assets"); assertEq(vault.balanceOf(ADMIN), 0, "User's balance in the vault should be zero after withdrawal"); - assertEq(vault.totalAssets(), 0, "Vault totalAssets should be zero after withdrawal"); - assertEq(vault.totalSupply(), 0, "Vault totalSupply should be zero after withdrawal"); + assertEq(vault.totalAssets(), 1 ether, "Vault totalAssets should be 1 ether after withdrawal"); + assertEq(vault.totalSupply(), 1 ether, "Vault totalSupply should be 1 ether after withdrawal"); vm.stopPrank(); } From 741d9efdf71457af77616bc75504666136636e8a Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 18:40:13 +0800 Subject: [PATCH 15/16] forge fmt --- src/VaultFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index d489894..291be87 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -96,7 +96,7 @@ contract VaultFactory is AccessControlUpgradeable { // bootstrap 1 ether of underlying to prevent donation attacks IERC20(asset_).approve(address(proxy), 1 ether); IERC4626(address(proxy)).deposit(1 ether, address(this)); - + emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); return address(proxy); } From 5cf324b9d86a15b26a3992a811c8116450497836 Mon Sep 17 00:00:00 2001 From: xhad Date: Tue, 27 Aug 2024 18:51:50 +0800 Subject: [PATCH 16/16] forge fmt --- src/VaultFactory.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol index 291be87..9871de0 100644 --- a/src/VaultFactory.sol +++ b/src/VaultFactory.sol @@ -96,7 +96,6 @@ contract VaultFactory is AccessControlUpgradeable { // bootstrap 1 ether of underlying to prevent donation attacks IERC20(asset_).approve(address(proxy), 1 ether); IERC4626(address(proxy)).deposit(1 ether, address(this)); - emit NewVault(address(proxy), name_, symbol_, VaultType.SingleAsset); return address(proxy); }