- OpenEthereum
- Setup OpenEthereum
- Beginner Introduction
- Frequently Asked Questions
- Usage and Config
- Technical Documentation
- Pluggable Consensus
- Aura - Authority Round
- Proof-of-Authority Chains
- Demo PoA-Tutorial
- Private Development Chain
- Transaction Queue
- Warp Sync (par)
- Warp Sync Snapshot Format
- Code flow
- Secret Store
- Permissioning
- WebAssembly (Deprecated)
- JSON RPC API
OpenEthereum CLI Sub-commands
Summary
- Export state
- Export blocks
- Import
- Account new
- Account list
- Account import
- Db kill
- Db reset
- Daemon
- Snapshot
- Restore
- Tools hash
- Signer new-token
Export state
Export state from a given –chain (default: foundation) to a file. This command requires the chain to be synced with –fat-db on.
Flags:
--no-code
Don’t export account code.--no-storage
Don’t export account storage.
Options:
--at <BLOCK>
Take a snapshot at the given block, which may be an index, hash, or latest. Note that taking snapshots at non-recent blocks will only work with –pruning archive--format <FORMAT>
Export in a given format. FORMAT must be either ‘hex’ or ‘binary’. (default: binary)--max-balance <WEI>
Don’t export accounts with a balance greater than specified.--min-balance <WEI>
Don’t export accounts with balance less than specified.
Example:
openethereum export state ./export-state-file.bin
Export blocks
Export blocks into the given –chain database (default: foundation). This command requires the chain to be synced with –fat-db on.
Options:
--format <FORMAT>
Export in a given format. FORMAT must be either ‘hex’ or ‘binary’. (default: binary)--from <BLOCK>
Export from block BLOCK, which may be an index or hash.--to <BLOCK>
Export to (including) block BLOCK, which may be an index, hash or latest.
Example:
openethereum export blocks --chain goerli ./export-blocks-goerli.bin
Import
Import blockchain from a file to the given –chain database (default: foundation).
Options:
--format <FORMAT>
Import in a given format. FORMAT must be either ‘hex’ or ‘binary’. (default: auto)
Example: openethereum import ./export-blocks-file.bin
Account new
Create a new account (and its associated key) for the given –chain (default: foundation).
Example:
openethereum --chain goerli account new
Loading config file from users.toml
Please note that password is NOT RECOVERABLE.
Type password:
Repeat password:
0x66a4b6f39b4c3e7203ab9caeecbad58d8f29b046
Account list
List existing accounts of the given –chain (default: foundation).
Example:
openethereum --chain goerli account list
0x00780865dcc3c7dbffd943136107e70b8270286b
0x00dfc93112abd2578503b667b95491b101281f2b
Account import
Import accounts from JSON UTC keystore files to the specified –chain (default mainnet).
Example:
openethereum --chain goerli account list
0x00780865dcc3c7dbffd943136107e70b8270286b
0x00dfc93112abd2578503b667b95491b101281f2b
$ openethereum account import --chain goerli ./keystore-file.json
1 account(s) imported
$ openethereum --chain goerli account list
0x003324332f7a9c2fb9536fcc4246a0bb4ea1b63f
0x00780865dcc3c7dbffd943136107e70b8270286b
0x00dfc93112abd2578503b667b95491b101281f2b
Db kill
Clean the database of the given –chain (default: foundation).
Example:
openethereum db kill --chain goerli
Database deleted.
Db reset
Removes <NUM>
latest blocks from the db
Example:
openethereum db reset --chain goerli 5
Successfully reset db!
Daemon
Launch OpenEthereum as a daemon.
Example:
openethereum daemon ~/openethereum-daemon.pid --chain goerli
Snapshot
Make a snapshot of the database of the given –chain (default: foundation).
Example:
openethereum snapshot ~/goerli.snapshot --chain goerli
Options:
--at <BLOCK> Take a snapshot at the given block, which may be an index, hash, or "latest". Note that taking
snapshots at non-recent blocks will only work with --pruning archive
Restore
Restore database of the given –chain (default: foundation) from snapshot.
Example:
openethereum restore ~/goerli.snapshot --chain goerli
Tools hash
Hash a file using Keccak-256 algorithm.
Example:
openethereum tools hash ./some_file_to_hash.zip
aa7c3630b1c735777964b7a60ab1c2db9059d369ecb12f155778ca0f408b849c
Signer new-token
Generate new token for the given –chain (default: foundation).
Example:
openethereum signer new-token --chain goerli
xAtk-66Q1-lPu5-b2o8
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论