File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ Most tests in `tests/` are marked `#[ignore]` and require network access (real R
148148- `TestBlockBuildBuilder` - Build blocks with `BlockBuild`
149149- `basic_scenario()`, `gas_limit_scenario()` - Pre-configured test scenarios
150150
151+ ## Workflow
152+
153+ After completing a set of changes, always run `make fmt` and `make clippy` and fix any issues before committing.
154+
151155## Local Development
152156
153157For local SDK development, uncomment the `[patch.crates-io]` section in Cargo.toml to point to local signet-sdk paths.
Original file line number Diff line number Diff line change @@ -23,5 +23,7 @@ target/
2323# VSCode debug launcher
2424.vscode/launch.json
2525
26+ # Claude configs
2627.claude/*.local.*
28+ .claude/settings.json
2729CLAUDE.local.md
Original file line number Diff line number Diff line change @@ -82,25 +82,25 @@ impl TestBlockBuildBuilder {
8282 }
8383
8484 /// Set the deadline duration from now.
85- pub fn with_deadline(mut self, duration: Duration) -> Self {
85+ pub const fn with_deadline(mut self, duration: Duration) -> Self {
8686 self.deadline_duration = duration;
8787 self
8888 }
8989
9090 /// Set the concurrency limit for parallel simulation.
91- pub fn with_concurrency(mut self, limit: usize) -> Self {
91+ pub const fn with_concurrency(mut self, limit: usize) -> Self {
9292 self.concurrency_limit = limit;
9393 self
9494 }
9595
9696 /// Set the maximum gas limit for the rollup block.
97- pub fn with_max_gas(mut self, gas: u64) -> Self {
97+ pub const fn with_max_gas(mut self, gas: u64) -> Self {
9898 self.max_gas = gas;
9999 self
100100 }
101101
102102 /// Set the maximum gas limit for host transactions.
103- pub fn with_max_host_gas(mut self, gas: u64) -> Self {
103+ pub const fn with_max_host_gas(mut self, gas: u64) -> Self {
104104 self.max_host_gas = gas;
105105 self
106106 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl TestDbBuilder {
5555 /// * `value` - The value to store
5656 pub fn with_storage(mut self, address: Address, slot: U256, value: U256) -> Self {
5757 // Ensure the account exists before setting storage
58- if self.db.cache.accounts.get (&address).is_none( ) {
58+ if ! self.db.cache.accounts.contains_key (&address) {
5959 self.db.insert_account_info(address, AccountInfo::default());
6060 }
6161 let _ = self.db.insert_account_storage(address, slot, value);
Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ impl TestSimEnvBuilder {
7979 }
8080
8181 /// Set the rollup block environment.
82- pub fn with_rollup_block_env(mut self, env: BlockEnv) -> Self {
82+ pub const fn with_rollup_block_env(mut self, env: BlockEnv) -> Self {
8383 self.rollup_block_env = env;
8484 self
8585 }
8686
8787 /// Set the host block environment.
88- pub fn with_host_block_env(mut self, env: BlockEnv) -> Self {
88+ pub const fn with_host_block_env(mut self, env: BlockEnv) -> Self {
8989 self.host_block_env = env;
9090 self
9191 }
@@ -98,7 +98,7 @@ impl TestSimEnvBuilder {
9898 }
9999
100100 /// Set the system constants.
101- pub fn with_constants(mut self, constants: SignetSystemConstants) -> Self {
101+ pub const fn with_constants(mut self, constants: SignetSystemConstants) -> Self {
102102 self.constants = constants;
103103 self
104104 }
Original file line number Diff line number Diff line change @@ -47,17 +47,17 @@ impl TestAccounts {
4747 }
4848
4949 /// Get Alice's address.
50- pub fn alice_address(&self) -> Address {
50+ pub const fn alice_address(&self) -> Address {
5151 self.alice.address()
5252 }
5353
5454 /// Get Bob's address.
55- pub fn bob_address(&self) -> Address {
55+ pub const fn bob_address(&self) -> Address {
5656 self.bob.address()
5757 }
5858
5959 /// Get Charlie's address.
60- pub fn charlie_address(&self) -> Address {
60+ pub const fn charlie_address(&self) -> Address {
6161 self.charlie.address()
6262 }
6363}
@@ -113,6 +113,7 @@ pub fn create_transfer_tx(
113113/// * `chain_id` - The chain ID
114114/// * `gas_limit` - The gas limit for the transaction
115115/// * `max_priority_fee_per_gas` - The priority fee per gas unit
116+ #[allow(clippy::too_many_arguments)]
116117pub fn create_call_tx(
117118 signer: &PrivateKeySigner,
118119 to: Address,
You can’t perform that action at this time.
0 commit comments