-
Notifications
You must be signed in to change notification settings - Fork 7
anvil: allow sending transactions from contract accounts #423
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
Conversation
iulianbarbu
left a 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.
lgtm!
|
|
||
| let charleth = Account::from(subxt_signer::eth::dev::charleth()); | ||
| let tx = TransactionRequest::default() | ||
| .value(U256::from(2e18)) |
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.
nit: capture 2e18 in a variable, and use it when asserting on the expected balance
Only works for contract accounts, not precompiles. This is needed so that test nodes like anvil can send transactions from contract accounts, a widely-used feature in tests Needed for paritytech/foundry-polkadot#423
Only works for contract accounts, not precompiles. This is needed so that test nodes like anvil can send transactions from contract accounts, a widely-used feature in tests Needed for paritytech/foundry-polkadot#423
Only works for contract accounts, not precompiles. This is needed so that test nodes like anvil can send transactions from contract accounts, a widely-used feature in tests Needed for paritytech/foundry-polkadot#423
Only works for contract accounts, not precompiles. This is needed so that test nodes like anvil can send transactions from contract accounts, a widely-used feature in tests Needed for paritytech/foundry-polkadot#423
re-gius
left a 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.
LGTM
Fixes the circle test hangs from our scc-testing repo.
Depends on paritytech/polkadot-sdk#10387.
Also adds a test for setting the balance of and impersonating a contract account, as well as sending a transaction from a contract account.
Small misc change: increase the default capacity of the storage overrides LRU and make it configurable via CLI.