-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix Native Token Bridge Tests for c-chain #207
Conversation
Was this a recent change? I'm wondering why we didn't bump into this before. |
Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com> Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com> Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
address public constant BURNED_TX_FEES_ADDRESS = 0x0100000000000000000000000000000000000000; | ||
// Designated Blackhole Address for this contract. Tokens are sent here to be "burned" when | ||
// a SourceAction.Burn message is received from the destination chain. | ||
address public constant BURN_ADDRESS = 0x0100000000000000000000000000000000010203; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this new burn address chosen? If it's not by random can you add in comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just arbitrary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addresses of the form 0x010000000000000000000000000000000000XXXX
are reserved for precompiles.
fundedKeyStr = "56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027" | ||
warpEnabledChainConfig = `{ | ||
"warp-api-enabled": true, | ||
"eth-apis":["eth","eth-filter","net","admin","web3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the eth-apis
config field used for, is it required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're different collections of API endpoints that the node can chose to run or not. There's a default set, and then some more advanced ones that not everyone might want to expose. TraceTransaction
uses one of the non-default APIs, and I've just enabled all the APIs I could find here to make it easier to use others in the future.
7c40855
Why this should be merged
Fixes native token bridge contracts and tests for compatibility with c-chain
How this works
Fund the deployerAddress in the native token bridge tests from the funded address.
Add
SendNativeTransfer
util function.subnet-evm
disallows and transactions being sent to0x0100000000000000000000000000000000000000
on the c-chain including strict value transfers. This means we need to have a different address to burn tokens with inNativeTokenSource
. I chose0x0100000000000000000000000000000000010203
to fall outside of the reserved range of addresses.Adds all API endpoints including tracer for the c-chain and subnet configs in our tests.
Added a check to the log for publish block hash.
How this was tested
E2E tests.
How is this documented