-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from gateway-fm/feat/cannon
Feat/cannon
- Loading branch information
Showing
188 changed files
with
144,398 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,11 @@ generate-perps_market-andromeda: | |
go run ./utils/getAbis/get-abis.go --get-mkdir ./Synthetix-Gitbook-v3/for-developers/abis/84531-andromeda-PerpsMarket.json ./contracts/perpsMarket | ||
abigen --abi=./contracts/84531-andromeda-PerpsMarket.json --pkg=perpsMarket --out=./contracts/perpsMarket/contract.go | ||
|
||
# generate go file for PerpsMarket contract on andromeda net from cannon abi | ||
generate-perps_market-andromeda-c: | ||
go run ./utils/getAbis/get-abis.go --get-mkdir ./cannon-synthetix/andromeda/perpsFactory/PerpsMarketProxy.json ./contracts/perpsMarket | ||
abigen --abi=./contracts/PerpsMarketProxy.json --pkg=perpsMarket --out=./contracts/perpsMarket/contract.go | ||
|
||
# generate go file for snxUSDT contract on andromeda net | ||
generate-susdt-andromeda: | ||
go run ./utils/getAbis/get-abis.go --get-mkdir ./Synthetix-Gitbook-v3/for-developers/abis/84531-andromeda-snxUSDToken.json ./contracts/sUSDT | ||
|
@@ -33,6 +38,10 @@ generate-erc7412-andromeda: | |
update-subtree: | ||
git subtree pull --prefix Synthetix-Gitbook-v3 [email protected]:Synthetixio/Synthetix-Gitbook-v3.git en --squash | ||
|
||
# fetch ABIs from cannon | ||
fetch-cannon-andromeda: | ||
cannon inspect synthetix-omnibus:latest@andromeda --chain-id 84531 -w ./cannon-synthetix/andromeda --sources | ||
|
||
# generate mock for service interface for testing | ||
mock-service: | ||
mockgen -source=services/service.go -destination=mocks/service/mockService.go | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 199 additions & 0 deletions
199
cannon-synthetix/andromeda/buyback_snx/buyback_snx.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
{ | ||
"address": "0x9e21Aa824b352856463F8525B805e0776FB96688", | ||
"abi": [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "_premium", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_snxFeeShare", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_oracleManager", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "_snxNodeId", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_snxToken", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_usdToken", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "OverflowInt256ToUint256", | ||
"type": "error" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "buyer", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "snx", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "usd", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "BuybackProcessed", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "DEAD", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "getPremium", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "getSnxFeeShare", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "getSnxNodeId", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "snxAmount", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "processBuyback", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint128", | ||
"name": "marketId", | ||
"type": "uint128" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "feeAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
} | ||
], | ||
"name": "quoteFees", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes4", | ||
"name": "interfaceId", | ||
"type": "bytes4" | ||
} | ||
], | ||
"name": "supportsInterface", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
], | ||
"constructorArgs": [ | ||
"10000000000000000", | ||
"500000000000000000", | ||
"0x439e6cbAaF61C63f406687907022960088801EC0", | ||
"0x1b41fbc42103cff8bca2f94cf0650bdd354e65e022b5e30a4c24508b18362028", | ||
"0x6B9db85A008424b1C985FE132D58dDaD80099b91", | ||
"0xa89163A087fe38022690C313b5D4BBF12574637f" | ||
], | ||
"linkedLibraries": {}, | ||
"deployTxnHash": "0x481aeb5935644fe4dcca306babc0ca82db9e34675506d8bc6e437c1f70d9ab3e", | ||
"sourceName": "contracts/BuybackSnx.sol", | ||
"contractName": "BuybackSnx", | ||
"deployedOn": "contract.buyback_snx", | ||
"gasUsed": 580519, | ||
"gasCost": "1500000254" | ||
} |
Oops, something went wrong.