|
| 1 | +# `declare` |
| 2 | +Declare a contract by fetching it from a different Starknet instance. |
| 3 | + |
| 4 | +## Required Common Arguments — Passed By CLI or Specified in `snfoundry.toml` |
| 5 | + |
| 6 | +* [`account`](./common.md#--account--a-account_name) |
| 7 | + |
| 8 | +## `--class-hash, -c <CLASS_HASH>` |
| 9 | +Required. |
| 10 | + |
| 11 | +Class hash of contract declared on a different network. |
| 12 | + |
| 13 | +## `--url, -u <RPC_URL>` |
| 14 | +Optional. |
| 15 | + |
| 16 | +Starknet RPC node url address. |
| 17 | + |
| 18 | +Overrides url from `snfoundry.toml`. |
| 19 | + |
| 20 | +## `--network <NETWORK>` |
| 21 | +Optional. |
| 22 | + |
| 23 | +Use predefined network with public provider |
| 24 | + |
| 25 | +Possible values: `mainnet`, `sepolia`. |
| 26 | + |
| 27 | +## `--source-url, -u <RPC_URL>` |
| 28 | +Optional. |
| 29 | + |
| 30 | +Starknet RPC node url address of the source network where the contract is already declared. |
| 31 | + |
| 32 | +## `--source-network <NETWORK>` |
| 33 | +Optional. |
| 34 | + |
| 35 | +Use predefined network with public provider where the contract is already declared. |
| 36 | + |
| 37 | +Possible values: `mainnet`, `sepolia`. |
| 38 | + |
| 39 | +## `--max-fee, -m <MAX_FEE>` |
| 40 | +Optional. |
| 41 | + |
| 42 | +Maximum fee for the `declare` denoted in FRI. Must be greater than zero. If provided, it is not possible to use any of the following fee related flags: `--l1-gas`, `--l1-data-price`, `--l2-gas`, `--l2-gas-price`, `--l1-data-gas`, `--l1-data-gas-price`. |
| 43 | + |
| 44 | +## `--l1-gas <L1_GAS>` |
| 45 | +Optional. |
| 46 | + |
| 47 | +Maximum L1 gas for the `declare` transaction. When not used, defaults to auto-estimation. |
| 48 | + |
| 49 | +## ` --l1-gas-price <l1_gas_price>` |
| 50 | +Optional. |
| 51 | + |
| 52 | +Maximum L1 gas unit price for the `declare` transaction. When not used, defaults to auto-estimation. |
| 53 | + |
| 54 | +## `--l2-gas <L2_GAS>` |
| 55 | +Optional. |
| 56 | + |
| 57 | +Maximum L2 gas for the `declare` transaction. When not used, defaults to auto-estimation. |
| 58 | + |
| 59 | +## `--l2-gas-price <L2_GAS_PRICE>` |
| 60 | +Optional. |
| 61 | + |
| 62 | +Maximum L2 gas unit price for the `declare` transaction. When not used, defaults to auto-estimation. |
| 63 | + |
| 64 | +## `--l1-data-gas <L1_DATA_GAS>` |
| 65 | +Optional. |
| 66 | + |
| 67 | +Maximum L1 data gas for the `declare` transaction. When not used, defaults to auto-estimation. |
| 68 | + |
| 69 | +## `--l1-data-gas-price <l1_data_gas_price>` |
| 70 | +Optional. |
| 71 | + |
| 72 | +Maximum L1 data gas unit price for the `declare` transaction. When not used, defaults to auto-estimation. |
| 73 | + |
| 74 | +## `--tip <TIP>` |
| 75 | +Optional. |
| 76 | +Conflicts with: [`--estimate-tip`](#--estimate-tip-estimate_tip) |
| 77 | + |
| 78 | +Tip for the transaction. Tip for the transaction. When not provided, defaults to 0 unless [`--estimate-tip`](#--estimate-tip-estimate_tip) is used. |
| 79 | + |
| 80 | +## `--estimate-tip <ESTIMATE_TIP>` |
| 81 | +Optional. |
| 82 | +Conflicts with: [`--tip`](#--tip-tip) |
| 83 | + |
| 84 | +If passed, an estimated tip will be added to pay for the transaction. The tip is estimated based on the current network conditions and added to the transaction fee. |
| 85 | + |
| 86 | +## `--nonce, -n <NONCE>` |
| 87 | +Optional. |
| 88 | + |
| 89 | +Nonce for transaction. If not provided, nonce will be set automatically. |
| 90 | + |
| 91 | +## `--block-id, -b <BLOCK_ID>` |
| 92 | +Optional. |
| 93 | + |
| 94 | +Block identifier on which class of declared contract should be fetched. |
| 95 | +Possible values: `pending`, `latest`, block hash (0x prefixed string), and block number (u64). |
| 96 | +`pending` is used as a default value. |
0 commit comments