Skip to content

Commit

Permalink
updated issuer on testnet and mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed Dec 19, 2022
1 parent e877da5 commit 3391f49
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions spot-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This repository is a collection of smart contracts that implement the SPOT perpe
The official mainnet addresses are:

- SPOT ERC-20 Token: [0xC1f33e0cf7e40a67375007104B929E49a581bafE](https://etherscan.io/address/0xC1f33e0cf7e40a67375007104B929E49a581bafE)
- Bond issuer: [0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66](https://etherscan.io/address/0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66)
- Bond issuer: [0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2](https://etherscan.io/address/0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2)
- Router: [0x38f600e08540178719BF656e6B43FC15A529c393](https://etherscan.io/address/0x38f600e08540178719BF656e6B43FC15A529c393)

## Install
Expand All @@ -27,7 +27,7 @@ yarn test
There is a testnet deployment on Goerli.

- SPOT ERC-20 Token: [0x95014Bc18F82a98CFAA3253fbD3184125A01f848](https://https://goerli.etherscan.io//address/0x95014Bc18F82a98CFAA3253fbD3184125A01f848)
- Bond issuer: [0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0](https://https://goerli.etherscan.io//address/0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0)
- Bond issuer: [0xbC060a1EbEC5eC869C4D51d4563244d4a223D307](https://https://goerli.etherscan.io//address/0xbC060a1EbEC5eC869C4D51d4563244d4a223D307)
- Router: [0x5e902bdCC408550b4BD612678bE2d57677664Dc9](https://https://goerli.etherscan.io//address/0x5e902bdCC408550b4BD612678bE2d57677664Dc9)

## Contribute
Expand Down
7 changes: 4 additions & 3 deletions spot-contracts/deployments/goerli.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"ampl": "0x74567107828843070087F1c6ec8322A3e8450725",
"bondFactory": "0xda5DbE504e7D532E4F8921B38E1F970D4b881BFB",
"bondIssuer": "0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0",
"bondFactory": "0xdDe914EfBF5C472a590e61658d8E342d17E3AAB7",
"bondIssuer": "0xbC060a1EbEC5eC869C4D51d4563244d4a223D307",
"spot": "0x95014Bc18F82a98CFAA3253fbD3184125A01f848",
"proxyAdmin": "0x47bF554606254dCEC37119348AA201c5A4ef2C58",
"router": "0x5e902bdCC408550b4BD612678bE2d57677664Dc9"
"router": "0x5e902bdCC408550b4BD612678bE2d57677664Dc9",
"previousIssuers": ["0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0"]
}
7 changes: 4 additions & 3 deletions spot-contracts/deployments/mainnet.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"ampl": "0xD46bA6D942050d489DBd938a2C909A5d5039A161",
"bondFactory": "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96",
"bondIssuer": "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66",
"bondFactory": "0x2b135C839d61808E1eC6F84151CD9429B0920374",
"bondIssuer": "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2",
"spot": "0xC1f33e0cf7e40a67375007104B929E49a581bafE",
"proxyAdmin": "0x2978B4103985A6668CE345555b0febdE64Fb092F",
"router": "0x38f600e08540178719BF656e6B43FC15A529c393"
"router": "0x38f600e08540178719BF656e6B43FC15A529c393",
"previousIssuers": ["0x9443b779d4AedF97d2B93D7CDa5fA0BB6312DfF2", "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66"]
}
14 changes: 5 additions & 9 deletions spot-contracts/tasks/goeril.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
yarn hardhat --network goerli deploy:MockAMPL

yarn hardhat --network goerli deploy:BondIssuer \
--bond-factory-address "0xda5DbE504e7D532E4F8921B38E1F970D4b881BFB" \
--bond-factory-address "0xdDe914EfBF5C472a590e61658d8E342d17E3AAB7" \
--bond-duration "3600" \
--issue-frequency "1200" \
--issue-window-offset "0" \
--collateral-token-address "0x74567107828843070087F1c6ec8322A3e8450725" \
--tranche-ratios "[500,500]"

yarn hardhat --network goerli deploy:PerpetualTranche \
--bond-issuer-address "0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0" \
--bond-issuer-address "0xbC060a1EbEC5eC869C4D51d4563244d4a223D307" \
--collateral-token-address "0x74567107828843070087F1c6ec8322A3e8450725" \
--name "SPOT" \
--symbol "SPOT" \
Expand All @@ -26,13 +26,6 @@ yarn hardhat --network goerli deploy:DiscountStrategy:setDiscount \

yarn hardhat --network goerli deploy:Router

## verify later
yarn hardhat verify:contract --network goerli --address 0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0 --constructor-arguments "[\"0xda5DbE504e7D532E4F8921B38E1F970D4b881BFB\",1200,0,3600,\"0x74567107828843070087F1c6ec8322A3e8450725\",[500,500]]"
yarn hardhat verify:contract --network goerli --address 0x5396479b65ed39360Ba6C16f6D7c9fd357674534 --constructor-arguments "[\"0x95014Bc18F82a98CFAA3253fbD3184125A01f848\",\"0x95014Bc18F82a98CFAA3253fbD3184125A01f848\",\"1000000\",\"1000000\",\"0\"]"
yarn hardhat verify:contract --network goerli --address 0x2DdF288F26490D1147296cC0FA2B3c4da5E15f10 --constructor-arguments "[]"
yarn hardhat verify:contract --network goerli --address 0x9649fa62f182a4922B9bb49129B20C8502027fEe --constructor-arguments "[]"
yarn hardhat verify:contract --network goerli --address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 --constructor-arguments "[]"
yarn hardhat verify:contract --network goerli --address 0x5e902bdCC408550b4BD612678bE2d57677664Dc9 --constructor-arguments "[]"

########################################################################
## OPS
Expand All @@ -48,6 +41,9 @@ yarn hardhat --network goerli ops:redeem \
--perp-address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 \
--amount 10

yarn hardhat --network goerli ops:redeemTranches \
--bond-issuer-address 0xbC060a1EbEC5eC869C4D51d4563244d4a223D307

yarn hardhat --network goerli ops:redeemTranches \
--bond-issuer-address 0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0

Expand Down
9 changes: 6 additions & 3 deletions spot-contracts/tasks/mainnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
## DEPLOYMENT
# monthly bonds, weekly issue, offset wednesday 2pm PST (DST)
yarn hardhat --network mainnet deploy:BondIssuer \
--bond-factory-address "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96" \
--bond-factory-address "0x2b135C839d61808E1eC6F84151CD9429B0920374" \
--bond-duration "2419200" \
--issue-frequency "604800" \
--issue-window-offset "597600" \
--collateral-token-address "0xD46bA6D942050d489DBd938a2C909A5d5039A161" \
--tranche-ratios "[200,800]"

yarn hardhat --network mainnet deploy:PerpetualTranche \
--bond-issuer-address "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66" \
--bond-issuer-address "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2" \
--collateral-token-address "0xD46bA6D942050d489DBd938a2C909A5d5039A161" \
--name "SPOT" \
--symbol "SPOT" \
Expand All @@ -27,7 +27,7 @@ yarn hardhat --network mainnet deploy:Router

########################################################################
## Transfer ownership
yarn hardhat --network mainnet transferOwnership "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66" \
yarn hardhat --network mainnet transferOwnership "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2" \
--new-owner-address "0x57981B1EaFe4b18EC97f8B10859B40207b364662"

yarn hardhat --network mainnet transferOwnership "0xFF732cA9EFc95E853FBD71a5c61647cd0C0898a3" \
Expand Down Expand Up @@ -66,6 +66,9 @@ yarn hardhat --network mainnet ops:redeemTranches \
yarn hardhat --network mainnet ops:redeemTranches \
--bond-issuer-address 0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66

yarn hardhat --network mainnet ops:redeemTranches \
--bond-issuer-address 0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2

yarn hardhat --network mainnet ops:trancheAndRollover \
--router-address 0x38f600e08540178719BF656e6B43FC15A529c393 \
--perp-address 0xC1f33e0cf7e40a67375007104B929E49a581bafE \
Expand Down

0 comments on commit 3391f49

Please sign in to comment.