Skip to content
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

enable eth and usdc.eth on mainnet #2013

Merged
merged 9 commits into from
Feb 24, 2023
Merged

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Dec 30, 2022

@chappjc

This comment was marked as resolved.

@chappjc chappjc added this to the 0.6 milestone Jan 4, 2023
@chappjc chappjc added the ETH label Jan 4, 2023
@chappjc
Copy link
Member Author

chappjc commented Jan 10, 2023

@itswisdomagain and I will be a bit busy with #1986, #2036, and #2025 for the next several days, so if anyone wants to push this branch to their remote and work on it, that's fine with me.

@chappjc

This comment was marked as resolved.

@chappjc
Copy link
Member Author

chappjc commented Jan 11, 2023

Just pushed 5140620 to resolve #1733 (comment) (thank you @norwnd)

@chappjc
Copy link
Member Author

chappjc commented Jan 11, 2023

Just pushed 6aed724 to address observations from final review of #1733 (review)
Namely, extremely tight gas limits on the swap contract txns. Targeting actual use equal to 97% of gas limit was not nearly adequate. Some wallets will target 66.6% (150% buffer over estimateGas). This commit changes ours to about 130% (we should see actual of about 77% the limit in etherscan).

@chappjc
Copy link
Member Author

chappjc commented Jan 11, 2023

Also need to review and probably further pad the v0Gases used for ETH swaps. Last comment and commit pertains to ERC20.

@chappjc
Copy link
Member Author

chappjc commented Jan 11, 2023

Last commit 0abeb4e is in regard to #1733 (comment) and the new reality of the asset.Wallet interface established in f950443 (reasoning also stated at the time of review in #1866 (comment))

@chappjc
Copy link
Member Author

chappjc commented Jan 31, 2023

Dropped the commit for block poll interval fiddling with routable hosts (likely public provider). Leaving the compiler settable interval commit.

@chappjc
Copy link
Member Author

chappjc commented Feb 16, 2023

There are live gas estimate issues begin resolved in #2129 and #2118, but this PR has no more changes pending.

All the gases are verified with actual on-chain transactions, not just estimates.

@chappjc
Copy link
Member Author

chappjc commented Feb 16, 2023

Rebased and re-tested an ETH swap with DCR. Again the current ETHSwap contract is https://etherscan.io/address/0x8c17e4968b6903e1601be82ca989c5b5e2c7b400

@chappjc
Copy link
Member Author

chappjc commented Feb 18, 2023

Also re-tested with USDC mainnet. Contract is still https://etherscan.io/address/0x1bbd020ddd6dc01f974aa74d2d727b2a6782f32d#code%5C

@chappjc chappjc force-pushed the eth-mainnet branch 2 times, most recently from e3d4c73 to 3d51c27 Compare February 20, 2023 16:02
@martonp
Copy link
Contributor

martonp commented Feb 20, 2023

I started a fresh dex, looked at the simnet exchange in view-only mode, had not yet tried to post any bonds, and I start seeing this log: Bond asset 0 not supported by DEX 127.0.0.1:17273

@chappjc
Copy link
Member Author

chappjc commented Feb 20, 2023

There's some hangover from view-only. That looks like another thing. Will look into that on the bond-reserves branch.
The other view-only related fix is in ae92a07

@chappjc
Copy link
Member Author

chappjc commented Feb 20, 2023

I don't quite get that error though if you didn't try to post any bonds (presumably didn't touch bond options either), I wonder why the view-only dex conn had targetTier > 0...

@chappjc chappjc force-pushed the eth-mainnet branch 2 times, most recently from d8ce193 to 82e78fa Compare February 21, 2023 23:07
@chappjc
Copy link
Member Author

chappjc commented Feb 22, 2023

I understand mainnet testing is a burden, so if there are troubles on that front we can chat on matrix and I can provide guidance.
Unless there are specific concerns about the contracts or the updates in this PR, I'd like to have this merged by EOW.

@chappjc
Copy link
Member Author

chappjc commented Feb 24, 2023

Ran another USDC swap today. Bad timing with gas (9am central is peak it seems), but otherwise it was fine.

@martonp Thanks for testing. You reported on matrix that it worked smoothly, correct?

@JoeGruffins has verified the contract source code via etherscan matches the contract in this PR. If one more person can also verify that, we can merge this.

https://etherscan.io/address/0x8c17e4968b6903e1601be82ca989c5b5e2c7b400#code#L1
https://etherscan.io/address/0x1bbd020ddd6dc01f974aa74d2d727b2a6782f32d#code#L1

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it looks good to me!

@chappjc chappjc merged commit 1b05383 into decred:master Feb 24, 2023
@chappjc chappjc deleted the eth-mainnet branch February 24, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth and erc20: enable mainnet
4 participants