Skip to content

Conversation

avalonche
Copy link
Collaborator

📝 Summary

permit calls to flashblocks number contract if flashtestations are enabled as well. default to regular flashblocks number contract if flashtestations are not enabled.

--flashblocks.flashblocks-number-contract-use-permit flag to enable.


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

}

fn estimate_flashblock_number_tx_gas(
fn current_flashblock_number(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add docs
Will this function just returns current flashblock number? If so why does it needs mutable ref to state?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

getting the tx nonce needs mutable ref. pub fn get_nonce(
db: &mut State,
address: Address,
) -> Result<u64, BuilderTransactionError> {
db.load_cache_account(address)
.map(|acc| acc.account_info().unwrap_or_default().nonce)
.map_err(|_| BuilderTransactionError::AccountLoadFailed(address))
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure if there's a way to do evm.transact without a signed tx?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

then the read only contract calls only need the call data

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you want this to be not mutable - you need to use basic_ref function (that implemented for DatabaseRef)

@avalonche avalonche force-pushed the flashtestations-permit branch from 75e520c to ef81cca Compare October 18, 2025 06:32
@avalonche avalonche force-pushed the flashtestations-permit branch from 82c5fea to e79a2c9 Compare October 18, 2025 10:32
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.

2 participants