-
Notifications
You must be signed in to change notification settings - Fork 149
enable eth and usdc.eth on mainnet #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5afb44d
f485398
ca17a92
65cc949
482d2c6
b20c2fb
19c3134
5e3c045
7d6fe47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,19 +44,19 @@ var ( | |||||||||||||
|
|
||||||||||||||
| ContractAddresses = map[uint32]map[dex.Network]common.Address{ | ||||||||||||||
| 0: { | ||||||||||||||
| dex.Mainnet: common.Address{}, | ||||||||||||||
| dex.Mainnet: common.HexToAddress("0x8C17e4968B6903E1601be82Ca989c5B5E2c7b400"), | ||||||||||||||
| dex.Simnet: common.HexToAddress("0x2f68e723b8989ba1c6a9f03e42f33cb7dc9d606f"), | ||||||||||||||
| dex.Testnet: common.HexToAddress("0x198463496037754564e9bea5418Bf4117Db0520C"), | ||||||||||||||
| }, | ||||||||||||||
| } | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| var v0Gases = &Gases{ | ||||||||||||||
| Swap: 135000, | ||||||||||||||
| SwapAdd: 113000, | ||||||||||||||
| Redeem: 63000, | ||||||||||||||
| RedeemAdd: 32000, | ||||||||||||||
| Refund: 43000, | ||||||||||||||
| Swap: 174500, // 134,500 actual -- https://goerli.etherscan.io/tx/0xa17b6edeaf79791b5fc9232dc05a56d43f3a67845f3248e763b77162fae9b181, verified on mainnet | ||||||||||||||
| SwapAdd: 146400, // 112,600 actual (247,100 for 2) -- https://goerli.etherscan.io/tx/0xa4fc65b8001bf8c44f1079b3d97adf42eb1097658e360b9033596253b0cbbd04, verified on mainnet | ||||||||||||||
| Redeem: 78600, // 60,456 actual -- https://goerli.etherscan.io/tx/0x5b22c48052df4a8ecd03a31b62e5015e6afe18c9ffb05e6cdd77396dfc3ca917, verified on mainnet | ||||||||||||||
| RedeemAdd: 41000, // 31,672 actual (92,083 for 2, 123,724 for 3) -- https://goerli.etherscan.io/tx/0xae424cc9b0d43bf934112245cb74ab9eca9c2611eabcd6257b6ec258b071c1e6, https://goerli.etherscan.io/tx/0x7ba7cb945da108d39a5a0ac580d4841c4017a32cd0e244f26845c6ed501d2475, verified on mainnet | ||||||||||||||
| Refund: 57000, // 43,014 actual -- https://goerli.etherscan.io/tx/0x586ed4cb7dab043f98d4cc08930d9eb291b0052d140d949b20232ceb6ad15f25 | ||||||||||||||
|
Comment on lines
+55
to
+59
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running the tests in #2050 with the new contract, on testnet.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The refund discrepancy here is smaller, but still there https://goerli.etherscan.io/tx/0x586ed4cb7dab043f98d4cc08930d9eb291b0052d140d949b20232ceb6ad15f25
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JoeGruffins I'm confused because I don't see your refunds on the swap contract: https://goerli.etherscan.io/address/0x198463496037754564e9bea5418bf4117db0520c
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I hadn't noticed til now, but it seems the gas estimate app does not refund, it only does |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| // LoadGenesisFile loads a Genesis config from a json file. | ||||||||||||||
|
|
@@ -240,9 +240,6 @@ var testTokenID, _ = dex.BipSymbolID("dextt.eth") | |||||||||||||
| var usdcTokenID, _ = dex.BipSymbolID("usdc.eth") | ||||||||||||||
|
|
||||||||||||||
| // Gases lists the expected gas required for various DEX and wallet operations. | ||||||||||||||
| // ★★ IMPORTANT ★★ By policy, clients should allow servers to adjust Swap and | ||||||||||||||
| // Redeem gas values in their *dex.Asset up to but not over 2x the value listed | ||||||||||||||
| // in VersionedGases or Tokens. | ||||||||||||||
|
Comment on lines
-243
to
-245
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the Server can specify fee rates, but not gas caps to use the in transactions. That would be like telling the BTC backend what size in bytes when planning the transaction. The client is in charge of authoring transactions the way they think is right (other than fee rates, payment amounts and recipients, etc.).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We actually have the size fields deprecated from Lines 1068 to 1073 in f950443
|
||||||||||||||
| type Gases struct { | ||||||||||||||
| // Approve is the amount of gas needed to approve the swap contract for | ||||||||||||||
| // transferring tokens. | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.