Skip to content

Commit e0116ac

Browse files
committed
deployed rollover vault to mainnet
1 parent aa6e68a commit e0116ac

File tree

4 files changed

+283
-1
lines changed

4 files changed

+283
-1
lines changed

spot-contracts/.openzeppelin/mainnet.json

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"address": "0xC1f33e0cf7e40a67375007104B929E49a581bafE",
1010
"txHash": "0x0b98db5773264dcf6c836e9b077cd17b633dfb5dabfbb7f7cbaaf5be0b513412",
1111
"kind": "transparent"
12+
},
13+
{
14+
"address": "0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd",
15+
"txHash": "0xc5b2302ca23f26fa26327bb3abb36827ca282cd20f0e571bd9cede84e6b5d329",
16+
"kind": "transparent"
1217
}
1318
],
1419
"impls": {
@@ -781,6 +786,267 @@
781786
}
782787
}
783788
}
789+
},
790+
"df6c2a5c1fbf7eab6eed2fda5220dd9af8c5a07f0a7efb7e1504c23970882fd0": {
791+
"address": "0x640Eb153c954a031E9bb9DAC197a7eCe0B54F1e8",
792+
"txHash": "0xa04b33c448f8ed6c37f4fd0961f6aeebcb86bebd79a1b2a8f0a81b963fec94c2",
793+
"layout": {
794+
"storage": [
795+
{
796+
"label": "_initialized",
797+
"offset": 0,
798+
"slot": "0",
799+
"type": "t_uint8",
800+
"contract": "Initializable",
801+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
802+
"retypedFrom": "bool"
803+
},
804+
{
805+
"label": "_initializing",
806+
"offset": 1,
807+
"slot": "0",
808+
"type": "t_bool",
809+
"contract": "Initializable",
810+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
811+
},
812+
{
813+
"label": "__gap",
814+
"offset": 0,
815+
"slot": "1",
816+
"type": "t_array(t_uint256)50_storage",
817+
"contract": "ContextUpgradeable",
818+
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
819+
},
820+
{
821+
"label": "_balances",
822+
"offset": 0,
823+
"slot": "51",
824+
"type": "t_mapping(t_address,t_uint256)",
825+
"contract": "ERC20Upgradeable",
826+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37"
827+
},
828+
{
829+
"label": "_allowances",
830+
"offset": 0,
831+
"slot": "52",
832+
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
833+
"contract": "ERC20Upgradeable",
834+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39"
835+
},
836+
{
837+
"label": "_totalSupply",
838+
"offset": 0,
839+
"slot": "53",
840+
"type": "t_uint256",
841+
"contract": "ERC20Upgradeable",
842+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41"
843+
},
844+
{
845+
"label": "_name",
846+
"offset": 0,
847+
"slot": "54",
848+
"type": "t_string_storage",
849+
"contract": "ERC20Upgradeable",
850+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43"
851+
},
852+
{
853+
"label": "_symbol",
854+
"offset": 0,
855+
"slot": "55",
856+
"type": "t_string_storage",
857+
"contract": "ERC20Upgradeable",
858+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44"
859+
},
860+
{
861+
"label": "__gap",
862+
"offset": 0,
863+
"slot": "56",
864+
"type": "t_array(t_uint256)45_storage",
865+
"contract": "ERC20Upgradeable",
866+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394"
867+
},
868+
{
869+
"label": "__gap",
870+
"offset": 0,
871+
"slot": "101",
872+
"type": "t_array(t_uint256)50_storage",
873+
"contract": "ERC20BurnableUpgradeable",
874+
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51"
875+
},
876+
{
877+
"label": "_owner",
878+
"offset": 0,
879+
"slot": "151",
880+
"type": "t_address",
881+
"contract": "OwnableUpgradeable",
882+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
883+
},
884+
{
885+
"label": "__gap",
886+
"offset": 0,
887+
"slot": "152",
888+
"type": "t_array(t_uint256)49_storage",
889+
"contract": "OwnableUpgradeable",
890+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
891+
},
892+
{
893+
"label": "_paused",
894+
"offset": 0,
895+
"slot": "201",
896+
"type": "t_bool",
897+
"contract": "PausableUpgradeable",
898+
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
899+
},
900+
{
901+
"label": "__gap",
902+
"offset": 0,
903+
"slot": "202",
904+
"type": "t_array(t_uint256)49_storage",
905+
"contract": "PausableUpgradeable",
906+
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
907+
},
908+
{
909+
"label": "_status",
910+
"offset": 0,
911+
"slot": "251",
912+
"type": "t_uint256",
913+
"contract": "ReentrancyGuardUpgradeable",
914+
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38"
915+
},
916+
{
917+
"label": "__gap",
918+
"offset": 0,
919+
"slot": "252",
920+
"type": "t_array(t_uint256)49_storage",
921+
"contract": "ReentrancyGuardUpgradeable",
922+
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74"
923+
},
924+
{
925+
"label": "underlying",
926+
"offset": 0,
927+
"slot": "301",
928+
"type": "t_contract(IERC20Upgradeable)1157",
929+
"contract": "RolloverVault",
930+
"src": "contracts/vaults/RolloverVault.sol:87"
931+
},
932+
{
933+
"label": "_deployed",
934+
"offset": 0,
935+
"slot": "302",
936+
"type": "t_struct(AddressSet)4620_storage",
937+
"contract": "RolloverVault",
938+
"src": "contracts/vaults/RolloverVault.sol:91"
939+
},
940+
{
941+
"label": "minDeploymentAmt",
942+
"offset": 0,
943+
"slot": "304",
944+
"type": "t_uint256",
945+
"contract": "RolloverVault",
946+
"src": "contracts/vaults/RolloverVault.sol:99"
947+
},
948+
{
949+
"label": "perp",
950+
"offset": 0,
951+
"slot": "305",
952+
"type": "t_contract(IPerpetualTranche)8314",
953+
"contract": "RolloverVault",
954+
"src": "contracts/vaults/RolloverVault.sol:102"
955+
}
956+
],
957+
"types": {
958+
"t_address": {
959+
"label": "address",
960+
"numberOfBytes": "20"
961+
},
962+
"t_array(t_bytes32)dyn_storage": {
963+
"label": "bytes32[]",
964+
"numberOfBytes": "32"
965+
},
966+
"t_array(t_uint256)45_storage": {
967+
"label": "uint256[45]",
968+
"numberOfBytes": "1440"
969+
},
970+
"t_array(t_uint256)49_storage": {
971+
"label": "uint256[49]",
972+
"numberOfBytes": "1568"
973+
},
974+
"t_array(t_uint256)50_storage": {
975+
"label": "uint256[50]",
976+
"numberOfBytes": "1600"
977+
},
978+
"t_bool": {
979+
"label": "bool",
980+
"numberOfBytes": "1"
981+
},
982+
"t_bytes32": {
983+
"label": "bytes32",
984+
"numberOfBytes": "32"
985+
},
986+
"t_contract(IERC20Upgradeable)1157": {
987+
"label": "contract IERC20Upgradeable",
988+
"numberOfBytes": "20"
989+
},
990+
"t_contract(IPerpetualTranche)8314": {
991+
"label": "contract IPerpetualTranche",
992+
"numberOfBytes": "20"
993+
},
994+
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
995+
"label": "mapping(address => mapping(address => uint256))",
996+
"numberOfBytes": "32"
997+
},
998+
"t_mapping(t_address,t_uint256)": {
999+
"label": "mapping(address => uint256)",
1000+
"numberOfBytes": "32"
1001+
},
1002+
"t_mapping(t_bytes32,t_uint256)": {
1003+
"label": "mapping(bytes32 => uint256)",
1004+
"numberOfBytes": "32"
1005+
},
1006+
"t_string_storage": {
1007+
"label": "string",
1008+
"numberOfBytes": "32"
1009+
},
1010+
"t_struct(AddressSet)4620_storage": {
1011+
"label": "struct EnumerableSetUpgradeable.AddressSet",
1012+
"members": [
1013+
{
1014+
"label": "_inner",
1015+
"type": "t_struct(Set)4319_storage",
1016+
"offset": 0,
1017+
"slot": "0"
1018+
}
1019+
],
1020+
"numberOfBytes": "64"
1021+
},
1022+
"t_struct(Set)4319_storage": {
1023+
"label": "struct EnumerableSetUpgradeable.Set",
1024+
"members": [
1025+
{
1026+
"label": "_values",
1027+
"type": "t_array(t_bytes32)dyn_storage",
1028+
"offset": 0,
1029+
"slot": "0"
1030+
},
1031+
{
1032+
"label": "_indexes",
1033+
"type": "t_mapping(t_bytes32,t_uint256)",
1034+
"offset": 0,
1035+
"slot": "1"
1036+
}
1037+
],
1038+
"numberOfBytes": "64"
1039+
},
1040+
"t_uint256": {
1041+
"label": "uint256",
1042+
"numberOfBytes": "32"
1043+
},
1044+
"t_uint8": {
1045+
"label": "uint8",
1046+
"numberOfBytes": "1"
1047+
}
1048+
}
1049+
}
7841050
}
7851051
}
7861052
}

spot-contracts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The official mainnet addresses are:
77
- SPOT ERC-20 Token: [0xC1f33e0cf7e40a67375007104B929E49a581bafE](https://etherscan.io/address/0xC1f33e0cf7e40a67375007104B929E49a581bafE)
88
- Bond issuer: [0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777](https://etherscan.io/address/0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777)
99
- Router: [0x38f600e08540178719BF656e6B43FC15A529c393](https://etherscan.io/address/0x38f600e08540178719BF656e6B43FC15A529c393)
10+
- RolloverVault: [0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd](https://etherscan.io//address/0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd)
1011

1112
## Install
1213

spot-contracts/hardhat.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default {
4343
accounts: {
4444
mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase,
4545
},
46-
gasMultiplier: 1.01,
46+
gasMultiplier: 1.005,
4747
},
4848
},
4949
solidity: {

spot-contracts/tasks/mainnet.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ yarn hardhat --network mainnet deploy:DiscountStrategy:computeDiscountHash \
3232
--tranche-index "0" \
3333
--tranche-discount "1.0"
3434

35+
yarn hardhat --network mainnet deploy:RolloverVault \
36+
--name "Rollover Vault Note (SPOT)" \
37+
--symbol "RV-NOTE-SPOT" \
38+
--perp-address "0xC1f33e0cf7e40a67375007104B929E49a581bafE"
39+
3540
########################################################################
3641
## Transfer ownership
3742
yarn hardhat --network mainnet transferOwnership "0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777" \
@@ -49,6 +54,9 @@ yarn hardhat --network mainnet transferOwnership "0xC1f33e0cf7e40a67375007104B92
4954
yarn hardhat --network mainnet transferOwnership "0x2978B4103985A6668CE345555b0febdE64Fb092F" \
5055
--new-owner-address "0x57981B1EaFe4b18EC97f8B10859B40207b364662"
5156

57+
yarn hardhat --network mainnet transferOwnership "0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd" \
58+
--new-owner-address "0x57981B1EaFe4b18EC97f8B10859B40207b364662"
59+
5260
########################################################################
5361
## OPS
5462
yarn hardhat --network mainnet ops:perp:info 0xC1f33e0cf7e40a67375007104B929E49a581bafE
@@ -92,6 +100,13 @@ yarn hardhat --network mainnet ops:trancheAndRollover \
92100
--perp-address 0xC1f33e0cf7e40a67375007104B929E49a581bafE \
93101
--collateral-amount 200
94102

103+
104+
yarn hardhat --network mainnet ops:vault:info 0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd
105+
106+
yarn hardhat --network mainnet ops:vault:deposit \
107+
--vault-address 0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd \
108+
--underlying-amount 2
109+
95110
########################################################################
96111
## upgrade
97112

0 commit comments

Comments
 (0)