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

feat(contracts): add gas estimation layer example and use recommended layers across examples #33

Closed
wants to merge 17 commits into from

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Mar 27, 2024

Closes #12

Blocked by upstream changes to improve API in alloy-rs/alloy#406

Specifically around current handling of from field, missing chain_id field (handled in FillTxLayer) and ordering of layers.

Comment on lines +54 to +57
.map(|mut tx| {
tx.set_chain_id(anvil.chain_id());
tx
})
Copy link
Member Author

Choose a reason for hiding this comment

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

Expected as a method directly accessible on contract_builder

Copy link
Member Author

Choose a reason for hiding this comment

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

The default case will likely be resolved by the new FillTxLayer proposal: alloy-rs/alloy#374 but generally still a good method to have direct access to I think.

let contract_address =
contract_builder.gas(estimate).gas_price(base_fee).nonce(0).deploy().await?;
let contract_address = contract_builder
.from(alice)
Copy link
Member Author

Choose a reason for hiding this comment

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

Expected not to be required, should be implicit that alice is the from if set as signer

@zerosnacks zerosnacks changed the title [Feature] Add gas estimation layer example and use recommended layers across examples feat(contracts): add gas estimation layer example and use recommended layers across examples Apr 2, 2024
@zerosnacks zerosnacks removed the blocked label Apr 8, 2024
@zerosnacks
Copy link
Member Author

Now unblocked: alloy-rs/alloy#406

Will likely require a refactor and reconsideration of proposed changes

@zerosnacks
Copy link
Member Author

Close in favor of #50

@zerosnacks zerosnacks closed this Apr 9, 2024
@zerosnacks zerosnacks deleted the zerosnacks/use-gas-estimation-layer branch April 17, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add GasFiller example to contracts and as gas_filler example in layers
1 participant