1414
1515## What is Engine?
1616
17- [ Aurora] ( https://doc.aurora.dev/getting-started/aurora-engine/ ) is an Ethereum Virtual Machine (EVM)
18- project built on the NEAR Protocol, that provides a solution for developers to deploy their apps
19- on an Ethereum-compatible, high-throughput, scalable and future-safe platform, with low transaction costs
17+ [ Aurora] ( https://doc.aurora.dev/getting-started/aurora-engine/ ) is an Ethereum
18+ Virtual Machine (EVM) project built on the NEAR Protocol, that provides a
19+ solution for developers to deploy their apps on an Ethereum-compatible,
20+ high-throughput, scalable and future-safe platform, with low transaction costs
2021for their users. Engine is the Aurora's implementation for it.
2122
2223## What is Aurora CLI?
2324
24- Aurora CLI is a command line interface to bootstrap Aurora Engine with rapid speed built with rust.
25+ Aurora CLI is a command line interface to bootstrap Aurora Engine with rapid
26+ speed built with rust.
2527
26- Aurora CLI comes pre-configuration with opinionated, sensible defaults for standard testing environments.
27- If other projects mention testing on Aurora, they are referring to the settings defined in this repo.
28+ Aurora CLI comes pre-configuration with opinionated, sensible defaults for
29+ standard testing environments. If other projects mention testing on Aurora, they
30+ are referring to the settings defined in this repo.
2831
2932** Aurora CLI has the following advantages over api:**
3033
3134- :pencil : ** Easily modifiable EVM states through terminal**
3235- :handshake : ** Quick to interact for rapid iterations**
3336
34- See also prior version [ aurora-cli] ( https://github.com/aurora-is-near/aurora-cli ) .
37+ See also prior version
38+ [ aurora-cli] ( https://github.com/aurora-is-near/aurora-cli ) .
3539
3640## Prerequisites
3741
@@ -40,14 +44,17 @@ See also prior version [aurora-cli](https://github.com/aurora-is-near/aurora-cli
4044## Quickstart
4145
4246- 📦 Install ` aurora-cli-rs ` and start interacting with it:
43- * ` cargo install --git https://github.com/aurora-is-near/aurora-cli-rs.git ` *
44- - 🔍 Check out what each command is for in the [ Commands Reference] ( #commands-reference ) section
45- - ✋ Have questions? Ask them at the official Aurora [ forum] ( https://forum.aurora.dev/ )
47+ _ ` cargo install --git https://github.com/aurora-is-near/aurora-cli-rs.git ` _
48+ - 🔍 Check out what each command is for in the
49+ [ Commands Reference] ( #commands-reference ) section
50+ - ✋ Have questions? Ask them at the official Aurora
51+ [ forum] ( https://forum.aurora.dev/ )
4652
4753## Usage
4854
49- In the following example, we will see how to deploy Aurora EVM on the ` localnet ` . Also, we will deploy a simple EVM
50- smart contract and will be interacting with it.
55+ In the following example, we will see how to deploy Aurora EVM on the
56+ ` localnet ` . Also, we will deploy a simple EVM smart contract and will be
57+ interacting with it.
5158
5259### ** Requirements**
5360
@@ -60,10 +67,11 @@ First what we need to do is to install `aurora-cli`:
6067
6168``` shell
6269git clone https://github.com/aurora-engine/aurora-cli-rs
63- cd aurora-cli-rs/cli && cargo install --path .
70+ cd aurora-cli-rs/cli && cargo install --path .
6471```
6572
66- Next we need to start a NEAR node locally. We can use the NEAR utility, ` nearup ` .
73+ Next we need to start a NEAR node locally. We can use the NEAR utility,
74+ ` nearup ` .
6775
6876### ** Start a NEAR node locally**
6977
@@ -79,16 +87,18 @@ Start NEAR node:
7987nearup run localnet --home /tmp/localnet
8088```
8189
82- When running the ` nearup run localnet ` command on Apple’s M-based hardware, a local build of ` neard ` is required due to
83- compatibility issues with the architecture.
90+ When running the ` nearup run localnet ` command on Apple’s M-based hardware, a
91+ local build of ` neard ` is required due to compatibility issues with the
92+ architecture.
8493
8594Start NEAR node (Apple's M-based hardware):
8695
8796``` shell
8897nearup run localnet --home /tmp/localnet --binary-path /path/to/nearcore/target/release
8998```
9099
91- Replace ` /path/to/nearcore/target/release ` with the actual path to the locally built ` neard ` binary.
100+ Replace ` /path/to/nearcore/target/release ` with the actual path to the locally
101+ built ` neard ` binary.
92102
93103### ** Prepare an account and create a private key file for Aurora EVM**
94104
@@ -125,8 +135,9 @@ aurora-cli --engine aurora.node0 --near-key-path /tmp/localnet/aurora_key.json i
125135
126136### ** Deploy the EVM smart contract**
127137
128- And now we can deploy the EVM smart contract. In our example, it will be a simple counter that can return its current
129- value and increment and decrement its value.
138+ And now we can deploy the EVM smart contract. In our example, it will be a
139+ simple counter that can return its current value and increment and decrement its
140+ value.
130141
131142But before that we need to generate a private key for signing transactions:
132143
@@ -161,13 +172,14 @@ If everything went well, the response should be like this:
161172Contract has been deployed to address: 0x53a9fed853e02a39bf8d298f751374de8b5a6ddf successfully
162173```
163174
164- So. Now we have deployed the smart contract at address: ` 0x53a9fed853e02a39bf8d298f751374de8b5a6ddf ` .
175+ So. Now we have deployed the smart contract at address:
176+ ` 0x53a9fed853e02a39bf8d298f751374de8b5a6ddf ` .
165177
166178### ** Interact with the smart contract**
167179
168180First, let's check that the current value is the same as we set in the
169- initialization stage. For that, we will use the ` view-call ` operation, which doesn't demand a private key
170- because it is a read-only operation:
181+ initialization stage. For that, we will use the ` view-call ` operation, which
182+ doesn't demand a private key because it is a read-only operation:
171183
172184``` shell
173185aurora-cli --engine aurora.node0 view-call -a 0x53a9fed853e02a39bf8d298f751374de8b5a6ddf -f value \
@@ -186,8 +198,8 @@ aurora-cli --engine aurora.node0 --near-key-path /tmp/localnet/aurora_key.json s
186198 --aurora-secret-key 3fac6dca1c6fc056b971a4e9090afbbfbdf3bc443e9cda595facb653cb1c01e1
187199```
188200
189- In the response, we can see if the transaction was successful and the amount of gas used for the execution of this
190- transaction.
201+ In the response, we can see if the transaction was successful and the amount of
202+ gas used for the execution of this transaction.
191203
192204Let's make sure that our value was incremented:
193205
@@ -200,13 +212,15 @@ So, if we can see `6` in the output then the demo was successful. That's it!
200212
201213### ** Build aurora-cli with the advanced command line interface (Advanced CLI)**
202214
203- Advanced CLI provides more options andadvanced features. You can try it by building with the following command:
215+ Advanced CLI provides more options andadvanced features. You can try it by
216+ building with the following command:
204217
205218``` shell
206219cargo install --path . --no-default-features -F advanced
207220```
208221
209- Documentation on how to work with the advanced version of ` aurora-cli ` can be found [ here] ( docs/localnet.md ) .
222+ Documentation on how to work with the advanced version of ` aurora-cli ` can be
223+ found [ here] ( docs/localnet.md ) .
210224
211225### ** Browse Deployed EVM Metadata**
212226
@@ -269,17 +283,19 @@ Disable whitelist status
269283aurora-cli --engine aurora.node0 set-whitelist-status --kind < whitelist-kind> --status 0
270284```
271285
272- Replace ` <whitelist-kind> ` with the desired whitelist type (admin, evm-admin, account, or address), and ` <entry-value> `
273- with the address or account to be whitelisted or removed.
286+ Replace ` <whitelist-kind> ` with the desired whitelist type (admin, evm-admin,
287+ account, or address), and ` <entry-value> ` with the address or account to be
288+ whitelisted or removed.
274289
275290Add whitelist batch
276291
277292``` shell
278293aurora-cli --engine aurora.node0 add-entry-to-whitelist-batch path/to/batch_list.json
279294```
280295
281- The batch should be provided in a JSON format. Each entry in the JSON array should have two properties: ` kind ` and
282- either ` account_id ` or ` address ` , depending on the type of whitelist being updated.
296+ The batch should be provided in a JSON format. Each entry in the JSON array
297+ should have two properties: ` kind ` and either ` account_id ` or ` address ` ,
298+ depending on the type of whitelist being updated.
283299
284300Example JSON batch file (` batch_list.json ` ):
285301
@@ -439,6 +455,7 @@ Options:
439455 --network <NETWORK> NEAR network ID [default: localnet]
440456 --engine <ACCOUNT_ID> Aurora EVM account [default: aurora]
441457 --near-key-path <NEAR_KEY_PATH> Path to file with NEAR account id and secret key in JSON format
458+ --block-number Block number to get data from
442459 -h, --help Print help
443460 -V, --version Print version
444461```
@@ -537,7 +554,6 @@ Arguments:
537554
538555Options:
539556 -h, --help Print help
540-
541557```
542558
543559### ` aurora-cli get-block-hash `
@@ -568,7 +584,6 @@ Arguments:
568584
569585Options:
570586 -h, --help Print help
571-
572587```
573588
574589### ` aurora-cli get-balance `
@@ -867,7 +882,7 @@ Options:
867882 --value <VALUE> Attached value in EVM transaction
868883 --from <FROM> From account_id
869884 -h, --help Print help
870- ```
885+ ```
871886
872887### ` aurora-cli submit `
873888
@@ -1202,7 +1217,7 @@ Usage: aurora-cli set-eth-connector-contract-account [OPTIONS] --account-id <ACC
12021217Options:
12031218 --account-id <ACCOUNT_ID> Account id of eth connector
12041219 --withdraw-ser <WITHDRAW_SER> Serialization type in withdraw method
1205- -h, --help
1220+ -h, --help
12061221```
12071222
12081223### ` aurora-cli get-eth-connector-contract-account `
@@ -1290,4 +1305,4 @@ Options:
12901305 --full-access-pub-key <FULL_ACCESS_PUB_KEY>
12911306 --function-call-pub-key <FUNCTION_CALL_PUB_KEY>
12921307 -h, --help Print help
1293- ```
1308+ ```
0 commit comments