diff --git a/science/.ipynb_checkpoints/spot-checkpoint.ipynb b/science/.ipynb_checkpoints/spot-checkpoint.ipynb index ad3e6c3d..28653236 100644 --- a/science/.ipynb_checkpoints/spot-checkpoint.ipynb +++ b/science/.ipynb_checkpoints/spot-checkpoint.ipynb @@ -166,7 +166,7 @@ "\n", "def printInfo(spot):\n", " print(exec(\"\"\"\n", - "yarn workspace @ampleforthorg/spot-contracts run hardhat --network ganache ops:info \"%s\"\n", + "yarn workspace @ampleforthorg/spot-contracts run hardhat --network ganache ops:perp:info \"%s\"\n", " \"\"\" % (spot.address)))\n", "\n", "def toAMPLFixedPt(amt):\n", diff --git a/science/spot.ipynb b/science/spot.ipynb index ad3e6c3d..28653236 100644 --- a/science/spot.ipynb +++ b/science/spot.ipynb @@ -166,7 +166,7 @@ "\n", "def printInfo(spot):\n", " print(exec(\"\"\"\n", - "yarn workspace @ampleforthorg/spot-contracts run hardhat --network ganache ops:info \"%s\"\n", + "yarn workspace @ampleforthorg/spot-contracts run hardhat --network ganache ops:perp:info \"%s\"\n", " \"\"\" % (spot.address)))\n", "\n", "def toAMPLFixedPt(amt):\n", diff --git a/spot-contracts/.openzeppelin/goerli.json b/spot-contracts/.openzeppelin/goerli.json index f65c6cf1..920cd08f 100644 --- a/spot-contracts/.openzeppelin/goerli.json +++ b/spot-contracts/.openzeppelin/goerli.json @@ -49,6 +49,31 @@ "address": "0x95014Bc18F82a98CFAA3253fbD3184125A01f848", "txHash": "0xb0b77c343e9f98acdcd119a04025b9cd6ba414fc643fc2a2a1f0bd6293d268fa", "kind": "transparent" + }, + { + "address": "0xD38C80aa5178F39cFB398066200E68af325D36b8", + "txHash": "0x6e3e6dcb71e6966319d37e42d5ba51ffb1c74e600460620760472b39729b1621", + "kind": "transparent" + }, + { + "address": "0xDf7c8364bb6007dB68Bb1c88317f8f7f5bBAfff8", + "txHash": "0x16c9cfb4d59c1030fd1acc05e0437b2e8a8ebab194449aba8780827429918711", + "kind": "transparent" + }, + { + "address": "0x1bcA4E8Cc3f93150132Bee5b0A32760b00686836", + "txHash": "0xd152a65e4f5f63e9860120e6a5b8ff262c76aaa33f4e6c80be78ae18af9881a7", + "kind": "transparent" + }, + { + "address": "0x942f35ce5885F737Beccd8EE3FDAAC81574D058E", + "txHash": "0x15a966c6945db5d308b949ebf0271dff2ba0ef97001dc8b43be62d4a72aa80ea", + "kind": "transparent" + }, + { + "address": "0xca36B64BEbdf141623911987b93767dcA4bF6F1f", + "txHash": "0x882e7b38cb8bfd743672130567a0eaf88bc59cafd4106059dc6945f2738810f3", + "kind": "transparent" } ], "impls": { @@ -2249,6 +2274,781 @@ } } } + }, + "d22de1c236eb88a7f29757885cb30e820a698673edfc65e1d5350f2a7c377f8a": { + "address": "0x6A62b32eD7900D53abcA6C9147ef206022241EB1", + "txHash": "0xed71d0c4e50c410c5f8ba601a8f386e90460a598c5f9c4adfa68bc4375c77274", + "layout": { + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" + }, + { + "label": "underlying", + "offset": 0, + "slot": "301", + "type": "t_contract(IERC20Upgradeable)1157", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:88" + }, + { + "label": "_deployed", + "offset": 0, + "slot": "302", + "type": "t_struct(AddressSet)4620_storage", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:92" + }, + { + "label": "perp", + "offset": 0, + "slot": "304", + "type": "t_contract(IPerpetualTranche)9610", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:98" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)1157": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)9610": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4620_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4319_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4319_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "9edc9af44c4f4a75f717bd966dc754c0374895a6501d3a771c5ed6a16dfe0ccb": { + "address": "0x989c595E6FC8AF16e403d7d3fC8f36A71714dCd7", + "txHash": "0x3474b6f4cfd71134478351d768f2c31e4a3083f9bcf2e63251ab6d3fcd2c1068", + "layout": { + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" + }, + { + "label": "minDeploymentAmt", + "offset": 0, + "slot": "301", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:83" + }, + { + "label": "underlying", + "offset": 0, + "slot": "302", + "type": "t_contract(IERC20Upgradeable)1157", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:95" + }, + { + "label": "_deployed", + "offset": 0, + "slot": "303", + "type": "t_struct(AddressSet)4620_storage", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:99" + }, + { + "label": "perp", + "offset": 0, + "slot": "305", + "type": "t_contract(IPerpetualTranche)9174", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:105" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)1157": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)9174": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4620_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4319_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4319_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "d1cd30a416ca26066c11c9f363f7ca43c0a6fce789d74cfa43b3d58a3b92ce39": { + "address": "0x5D352731b5A82A089Fe49BCd143d705c3A3c8889", + "txHash": "0x44d72a59b89802d03f627fdbf860862013d83b3d0966be661aef101bfb2afbeb", + "layout": { + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" + }, + { + "label": "underlying", + "offset": 0, + "slot": "301", + "type": "t_contract(IERC20Upgradeable)1157", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:87" + }, + { + "label": "_deployed", + "offset": 0, + "slot": "302", + "type": "t_struct(AddressSet)4620_storage", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:91" + }, + { + "label": "minDeploymentAmt", + "offset": 0, + "slot": "304", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:99" + }, + { + "label": "perp", + "offset": 0, + "slot": "305", + "type": "t_contract(IPerpetualTranche)9651", + "contract": "RolloverVault", + "src": "contracts/vaults/RolloverVault.sol:102" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)1157": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)9651": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4620_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4319_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4319_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/spot-contracts/README.md b/spot-contracts/README.md index 09eb0cd4..494de596 100644 --- a/spot-contracts/README.md +++ b/spot-contracts/README.md @@ -26,9 +26,10 @@ yarn test There is a testnet deployment on Goerli. -- SPOT ERC-20 Token: [0x95014Bc18F82a98CFAA3253fbD3184125A01f848](https://https://goerli.etherscan.io//address/0x95014Bc18F82a98CFAA3253fbD3184125A01f848) -- Bond issuer: [0xbC060a1EbEC5eC869C4D51d4563244d4a223D307](https://https://goerli.etherscan.io//address/0xbC060a1EbEC5eC869C4D51d4563244d4a223D307) -- Router: [0x5e902bdCC408550b4BD612678bE2d57677664Dc9](https://https://goerli.etherscan.io//address/0x5e902bdCC408550b4BD612678bE2d57677664Dc9) +- SPOT ERC-20 Token: [0x95014Bc18F82a98CFAA3253fbD3184125A01f848](https://goerli.etherscan.io//address/0x95014Bc18F82a98CFAA3253fbD3184125A01f848) +- Bond issuer: [0xbC060a1EbEC5eC869C4D51d4563244d4a223D307](https://goerli.etherscan.io//address/0xbC060a1EbEC5eC869C4D51d4563244d4a223D307) +- Router: [0x5e902bdCC408550b4BD612678bE2d57677664Dc9](https://goerli.etherscan.io//address/0x5e902bdCC408550b4BD612678bE2d57677664Dc9) +- RolloverVault: [0xca36B64BEbdf141623911987b93767dcA4bF6F1f](https://goerli.etherscan.io//address/0xca36B64BEbdf141623911987b93767dcA4bF6F1f) ## Contribute diff --git a/spot-contracts/deployments/goerli.json b/spot-contracts/deployments/goerli.json index 4201f748..68f96bd4 100644 --- a/spot-contracts/deployments/goerli.json +++ b/spot-contracts/deployments/goerli.json @@ -5,5 +5,6 @@ "spot": "0x95014Bc18F82a98CFAA3253fbD3184125A01f848", "proxyAdmin": "0x47bF554606254dCEC37119348AA201c5A4ef2C58", "router": "0x5e902bdCC408550b4BD612678bE2d57677664Dc9", - "previousIssuers": ["0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0"] + "previousIssuers": ["0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0"], + "rolloverVault": "0x942f35ce5885F737Beccd8EE3FDAAC81574D058E" } diff --git a/spot-contracts/hardhat.config.ts b/spot-contracts/hardhat.config.ts index f6718728..01bfefb9 100644 --- a/spot-contracts/hardhat.config.ts +++ b/spot-contracts/hardhat.config.ts @@ -34,14 +34,15 @@ export default { accounts: { mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, }, - gasMultiplier: 1.1, + gasMultiplier: 1.03, + allowUnlimitedContractSize: true, }, mainnet: { url: `https://mainnet.infura.io/v3/${process.env.INFURA_SECRET}`, accounts: { mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, }, - gasMultiplier: 1.02, + gasMultiplier: 1.01, }, }, solidity: { diff --git a/spot-contracts/tasks/deploy/index.ts b/spot-contracts/tasks/deploy/index.ts index 52f8aa41..86208832 100644 --- a/spot-contracts/tasks/deploy/index.ts +++ b/spot-contracts/tasks/deploy/index.ts @@ -1,3 +1,4 @@ import "./ampl"; import "./buttonwood"; import "./perp"; +import "./vaults"; diff --git a/spot-contracts/tasks/deploy/perp.ts b/spot-contracts/tasks/deploy/perp.ts index 40ff43ed..f90b9f03 100644 --- a/spot-contracts/tasks/deploy/perp.ts +++ b/spot-contracts/tasks/deploy/perp.ts @@ -100,6 +100,19 @@ task("deploy:PerpetualTranche") }); }); +task("deploy:DiscountStrategy:computeDiscountHash") + .addParam("collateralTokenAddress", "the address of the collateral token", undefined, types.string, false) + .addParam("trancheRatios", "the bond's tranche ratios", undefined, types.json, false) + .addParam("trancheIndex", "the tranche's index", undefined, types.string, false) + .setAction(async function (args: TaskArguments, hre) { + const { collateralTokenAddress, trancheRatios, trancheIndex } = args; + const abiCoder = new hre.ethers.utils.AbiCoder(); + const hash = hre.ethers.utils.keccak256( + abiCoder.encode(["address", "uint256[]", "uint256"], [collateralTokenAddress, trancheRatios, trancheIndex]), + ); + console.log(hash); + }); + task("deploy:DiscountStrategy:setDiscount") .addParam("discountStrategyAddress", "the address of the discount strategy contract", undefined, types.string, false) .addParam("collateralTokenAddress", "the address of the collateral token", undefined, types.string, false) diff --git a/spot-contracts/tasks/deploy/vaults.ts b/spot-contracts/tasks/deploy/vaults.ts new file mode 100644 index 00000000..c5305fa8 --- /dev/null +++ b/spot-contracts/tasks/deploy/vaults.ts @@ -0,0 +1,32 @@ +import { getImplementationAddress } from "@openzeppelin/upgrades-core"; +import { task, types } from "hardhat/config"; +import { TaskArguments } from "hardhat/types"; +import { sleep } from "../helpers"; + +task("deploy:RolloverVault") + .addParam("perpAddress", "The address of the perpetual tranche contract", undefined, types.string, false) + .addParam("name", "the ERC20 name", undefined, types.string, false) + .addParam("symbol", "the ERC20 symbol", undefined, types.string, false) + .setAction(async function (args: TaskArguments, hre) { + const { perpAddress, name, symbol } = args; + const deployer = (await hre.ethers.getSigners())[0]; + console.log("Signer", await deployer.getAddress()); + + const RolloverVault = await hre.ethers.getContractFactory("RolloverVault"); + const vault = await hre.upgrades.deployProxy(RolloverVault.connect(deployer)); + await vault.deployed(); + + const implAddress = await getImplementationAddress(hre.ethers.provider, vault.address); + + console.log("perp", perpAddress); + console.log("vault", vault.address); + console.log("vaultImpl", implAddress); + + const initTx = await vault.init(name, symbol, perpAddress); + await initTx.wait(); + + await sleep(15); + await hre.run("verify:contract", { + address: implAddress, + }); + }); diff --git a/spot-contracts/tasks/ganache.sh b/spot-contracts/tasks/ganache.sh index 8a75e716..35d3eea3 100644 --- a/spot-contracts/tasks/ganache.sh +++ b/spot-contracts/tasks/ganache.sh @@ -33,7 +33,7 @@ yarn hardhat --network ganache deploy:Router ######################################################################## ## OPS -yarn hardhat --network ganache ops:info 0x89967625335C35c5FE1F3C1c03D37fdEb6f415Ed +yarn hardhat --network ganache ops:perp:info 0x89967625335C35c5FE1F3C1c03D37fdEb6f415Ed yarn hardhat --network ganache ops:trancheAndDeposit \ --router-address 0x4a57d51af3a8a90905a5F756E0B28cC2888A1bD5 \ diff --git a/spot-contracts/tasks/goeril.sh b/spot-contracts/tasks/goeril.sh index 62b69aad..94a1868e 100644 --- a/spot-contracts/tasks/goeril.sh +++ b/spot-contracts/tasks/goeril.sh @@ -26,10 +26,15 @@ yarn hardhat --network goerli deploy:DiscountStrategy:setDiscount \ yarn hardhat --network goerli deploy:Router +yarn hardhat --network goerli deploy:RolloverVault \ + --name "SPOT Rollover Vault Note" \ + --symbol "SPOT-RV-NOTE" \ + --perp-address "0x95014Bc18F82a98CFAA3253fbD3184125A01f848" + ######################################################################## ## OPS -yarn hardhat --network goerli ops:info 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 +yarn hardhat --network goerli ops:perp:info 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 yarn hardhat --network goerli ops:updateState 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 @@ -63,8 +68,22 @@ yarn hardhat --network goerli ops:rebase:MockAMPL \ --ampl-address "0x74567107828843070087F1c6ec8322A3e8450725" \ --rebase-perc 0.1 +yarn hardhat --network goerli ops:vault:info 0xca36B64BEbdf141623911987b93767dcA4bF6F1f + +yarn hardhat --network goerli ops:vault:deposit \ + --vault-address 0xca36B64BEbdf141623911987b93767dcA4bF6F1f \ + --underlying-amount 1 + +yarn hardhat --network goerli ops:vault:redeem \ + --vault-address 0xca36B64BEbdf141623911987b93767dcA4bF6F1f \ + --amount 1 + +yarn hardhat --network goerli ops:vault:recoverAndRedeploy \ + --vault-address 0xca36B64BEbdf141623911987b93767dcA4bF6F1f ######################################################################## ## upgrade yarn hardhat --network goerli upgrade:perp:testnet 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 + +yarn hardhat --network goerli upgrade:rolloverVault:testnet 0xca36B64BEbdf141623911987b93767dcA4bF6F1f diff --git a/spot-contracts/tasks/mainnet.sh b/spot-contracts/tasks/mainnet.sh index a2cfe4ef..49a49149 100644 --- a/spot-contracts/tasks/mainnet.sh +++ b/spot-contracts/tasks/mainnet.sh @@ -25,6 +25,13 @@ yarn hardhat --network mainnet deploy:DiscountStrategy:setDiscount \ yarn hardhat --network mainnet deploy:Router +yarn hardhat --network mainnet deploy:DiscountStrategy:computeDiscountHash \ + --discount-strategy-address "0x2C85Fb101192e3B969c03533a3BE0b3d5f764cef" \ + --collateral-token-address "0xD46bA6D942050d489DBd938a2C909A5d5039A161" \ + --tranche-ratios "[250,750]" \ + --tranche-index "0" \ + --tranche-discount "1.0" + ######################################################################## ## Transfer ownership yarn hardhat --network mainnet transferOwnership "0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777" \ @@ -44,7 +51,7 @@ yarn hardhat --network mainnet transferOwnership "0x2978B4103985A6668CE345555b0f ######################################################################## ## OPS -yarn hardhat --network mainnet ops:info 0xC1f33e0cf7e40a67375007104B929E49a581bafE +yarn hardhat --network mainnet ops:perp:info 0xC1f33e0cf7e40a67375007104B929E49a581bafE # test ops yarn hardhat --network mainnet ops:updateState 0xC1f33e0cf7e40a67375007104B929E49a581bafE diff --git a/spot-contracts/tasks/ops/index.ts b/spot-contracts/tasks/ops/index.ts index 0511c8b5..4290b627 100644 --- a/spot-contracts/tasks/ops/index.ts +++ b/spot-contracts/tasks/ops/index.ts @@ -2,3 +2,4 @@ import "./ampl"; import "./perp"; import "./perp_rollover"; import "./testnet"; +import "./vaults"; diff --git a/spot-contracts/tasks/ops/perp.ts b/spot-contracts/tasks/ops/perp.ts index 440c5bfc..62d68376 100644 --- a/spot-contracts/tasks/ops/perp.ts +++ b/spot-contracts/tasks/ops/perp.ts @@ -3,7 +3,7 @@ import { task, types } from "hardhat/config"; import { TaskArguments } from "hardhat/types"; import { utils, constants, BigNumber } from "ethers"; -task("ops:info") +task("ops:perp:info") .addPositionalParam("perpAddress", "the address of the perp contract", undefined, types.string, false) .setAction(async function (args: TaskArguments, hre) { const { perpAddress } = args; diff --git a/spot-contracts/tasks/ops/vaults.ts b/spot-contracts/tasks/ops/vaults.ts new file mode 100644 index 00000000..31b0a037 --- /dev/null +++ b/spot-contracts/tasks/ops/vaults.ts @@ -0,0 +1,212 @@ +import { getAdminAddress, getImplementationAddress } from "@openzeppelin/upgrades-core"; +import { task, types } from "hardhat/config"; +import { TaskArguments } from "hardhat/types"; +import { BigNumber, utils } from "ethers"; + +task("ops:vault:info") + .addPositionalParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + const vaultDecimals = await vault.decimals(); + const proxyAdminAddress = await getAdminAddress(hre.ethers.provider, vaultAddress); + const implAddress = await getImplementationAddress(hre.ethers.provider, vaultAddress); + const vaultSupply = await vault.totalSupply(); + + const perp = await hre.ethers.getContractAt("PerpetualTranche", await vault.perp()); + const perpDecimals = await perp.decimals(); + const priceDecimals = await perp.PRICE_DECIMALS(); + + const underlying = await hre.ethers.getContractAt("MockERC20", await vault.underlying()); + const underlyingDecimals = await underlying.decimals(); + + console.log("---------------------------------------------------------------"); + console.log("RolloverVault:", vault.address); + console.log("proxyAdmin:", proxyAdminAddress); + console.log("implementation:", implAddress); + console.log("owner:", await vault.owner()); + console.log("paused:", await vault.paused()); + console.log("perp:", perp.address); + console.log("underlying:", underlying.address); + console.log("TotalSupply:", utils.formatUnits(vaultSupply, vaultDecimals)); + console.log("tvl:", utils.formatUnits(await vault.callStatic.getTVL(), underlyingDecimals)); + console.log("---------------------------------------------------------------"); + const data = []; + const underlyingBalance = await vault.vaultAssetBalance(underlying.address); + data.push({ + asset: await underlying.symbol(), + balance: utils.formatUnits(underlyingBalance, underlyingDecimals), + price: "1", + }); + const deployedCount = (await vault.deployedCount()).toNumber(); + for (let i = 0; i < deployedCount; i++) { + const tokenAddress = await vault.callStatic.deployedAt(i); + const balance = await vault.vaultAssetBalance(tokenAddress); + const value = await vault.callStatic.getVaultAssetValue(tokenAddress); + const price = value.mul(BigNumber.from(10 ** priceDecimals)).div(balance); + + const token = await hre.ethers.getContractAt("MockERC20", tokenAddress); + data.push({ + asset: await token.symbol(), + balance: utils.formatUnits(balance, underlyingDecimals), + price: utils.formatUnits(price, priceDecimals), + }); + } + + const earned1Balance = await vault.vaultAssetBalance(perp.address); + const earned1Price = await perp.callStatic.getAvgPrice(); + data.push({ + asset: await perp.symbol(), + balance: utils.formatUnits(earned1Balance, perpDecimals), + price: utils.formatUnits(earned1Price, priceDecimals), + }); + console.table(data); + }); + +task("ops:vault:deposit") + .addParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .addParam( + "underlyingAmount", + "the total amount of underlying tokens (in float) to deposit", + undefined, + types.string, + false, + ) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress, underlyingAmount } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + const underlying = await hre.ethers.getContractAt("MockERC20", await vault.underlying()); + const fixedPtAmount = utils.parseUnits(underlyingAmount, await underlying.decimals()); + + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Signer note balance", utils.formatUnits(await vault.balanceOf(signerAddress), await vault.decimals())); + console.log( + "Signer underlying balance", + utils.formatUnits(await underlying.balanceOf(signerAddress), await underlying.decimals()), + ); + + console.log("---------------------------------------------------------------"); + console.log("Execution:"); + console.log("Approving router to spend tokens:"); + if ((await underlying.allowance(signerAddress, vault.address)).lt(fixedPtAmount)) { + const tx1 = await underlying.connect(signer).approve(vault.address, fixedPtAmount); + await tx1.wait(); + console.log("Tx", tx1.hash); + } + + console.log("Deposit:"); + const tx3 = await vault.connect(signer).deposit(fixedPtAmount); + await tx3.wait(); + console.log("Tx", tx3.hash); + + console.log("Signer note balance", utils.formatUnits(await vault.balanceOf(signerAddress), await vault.decimals())); + console.log( + "Signer underlying balance", + utils.formatUnits(await underlying.balanceOf(signerAddress), await underlying.decimals()), + ); + }); + +task("ops:vault:redeem") + .addParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .addParam("amount", "the total amount of vault notes (in float) to redeem", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress, amount } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + const underlying = await hre.ethers.getContractAt("MockERC20", await vault.underlying()); + const underlyingDecimals = await underlying.decimals(); + const fixedPtAmount = utils.parseUnits(amount, await vault.decimals()); + + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + console.log("Signer note balance", utils.formatUnits(await vault.balanceOf(signerAddress), await vault.decimals())); + + console.log("---------------------------------------------------------------"); + console.log("Preview redeem:", amount); + const redemptions = await vault.callStatic.redeem(fixedPtAmount); + const redemptionData = []; + for (let i = 0; i < redemptions.length; i++) { + const token = await hre.ethers.getContractAt("MockERC20", redemptions[i].token); + redemptionData.push({ + asset: await token.symbol(), + amount: utils.formatUnits(redemptions[i].amount, underlyingDecimals), + }); + } + console.table(redemptionData); + + console.log("---------------------------------------------------------------"); + console.log("Execution:"); + console.log("Redeem:"); + const tx = await vault.connect(signer).redeem(fixedPtAmount); + await tx.wait(); + console.log("Tx", tx.hash); + console.log("Signer note balance", utils.formatUnits(await vault.balanceOf(signerAddress), await vault.decimals())); + }); + +task("ops:vault:recoverAndRedeploy") + .addParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + + console.log("---------------------------------------------------------------"); + console.log("Execution:"); + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Recover and redeploy:"); + const tx = await vault.connect(signer).recoverAndRedeploy(); + await tx.wait(); + console.log("Tx", tx.hash); + }); + +task("ops:vault:deploy") + .addParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + + console.log("---------------------------------------------------------------"); + console.log("Execution:"); + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Deploy:"); + const tx = await vault.connect(signer).deploy(); + await tx.wait(); + console.log("Tx", tx.hash); + }); + +task("ops:vault:recover") + .addParam("vaultAddress", "the address of the vault contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress } = args; + + const vault = await hre.ethers.getContractAt("RolloverVault", vaultAddress); + + console.log("---------------------------------------------------------------"); + console.log("Execution:"); + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Recover:"); + const tx = await vault.connect(signer)["recover()"](); + await tx.wait(); + console.log("Tx", tx.hash); + }); diff --git a/spot-contracts/tasks/tools.ts b/spot-contracts/tasks/tools.ts index e27099ea..a572e4e4 100644 --- a/spot-contracts/tasks/tools.ts +++ b/spot-contracts/tasks/tools.ts @@ -22,7 +22,7 @@ task("verify:contract", "Verifies on etherscan") }); } catch (e) { console.log("Unable to verify on etherscan"); - // console.warn(e) + console.warn(e); console.log( `yarn hardhat verify:contract --network ${hre.network.name} --address ${ args.address diff --git a/spot-contracts/tasks/upgrade/index.ts b/spot-contracts/tasks/upgrade/index.ts index d09878ca..3dbc1c50 100644 --- a/spot-contracts/tasks/upgrade/index.ts +++ b/spot-contracts/tasks/upgrade/index.ts @@ -1 +1,2 @@ import "./perp"; +import "./vaults"; diff --git a/spot-contracts/tasks/upgrade/vaults.ts b/spot-contracts/tasks/upgrade/vaults.ts new file mode 100644 index 00000000..76761f02 --- /dev/null +++ b/spot-contracts/tasks/upgrade/vaults.ts @@ -0,0 +1,29 @@ +import { getImplementationAddress } from "@openzeppelin/upgrades-core"; +import { task, types } from "hardhat/config"; +import { TaskArguments } from "hardhat/types"; +import { sleep } from "../helpers"; + +task("upgrade:rolloverVault:testnet") + .addPositionalParam("vaultAddress", "the address of the rollover vault contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { vaultAddress } = args; + + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Current implementation", await getImplementationAddress(hre.ethers.provider, vaultAddress)); + + const RolloverVault = await hre.ethers.getContractFactory("RolloverVault"); + const vault = await hre.upgrades.upgradeProxy(vaultAddress, RolloverVault); + await vault.deployed(); + + const newImpl = await getImplementationAddress(hre.ethers.provider, vaultAddress); + console.log("Updated implementation", newImpl); + + await sleep(15); + await hre.run("verify:contract", { + address: newImpl, + }); + });