# eosc-bin **Repository Path**: eostech/eosc-bin ## Basic Information - **Project Name**: eosc-bin - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-27 - **Last Updated**: 2023-07-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 创建本地钱包 ``` eosc vault create --import --comment "Airtight wallet" ``` 此时会导入私钥 # 发交易 ``` root@VM-0-5-ubuntu:/opt/eosc# eosc tx create hello hi '{"user":"alice"}' -p alice -u http://achain.hpe.net.cn:8888 --debug ------------------------------- POST /v1/chain/abi_json_to_bin HTTP/1.1 Host: achain.hpe.net.cn:8888 {"action":"hi","args":{"user":"alice"},"code":"hello"} RESPONSE: http: ContentLength=30 with Body length 0 ------------------------------- {"binargs":"0000000000855c34"} ------------------------------- "" ------------------------------- POST /v1/chain/get_info HTTP/1.1 Host: achain.hpe.net.cn:8888 RESPONSE: http: ContentLength=671 with Body length 0 ------------------------------- {"server_version":"c8869e6e","chain_id":"4a2fb7b7aacce5ea952dc96fbac6ed648efc08c1e1577882f3f33c82da248d64","head_block_num":125146694,"last_irreversible_block_num":125146691,"last_irreversible_block_id":"077596430ab74c6b810b232436db67d19028b74b181ff69616b1b97d880368f4","head_block_id":"07759646438abf57503e85ab2c0aa3daf1fe4e13a3d57719cfce48709c539123","head_block_time":"2022-01-27T10:06:42.000","head_block_producer":"prod.b","current_view":14780,"target_view":14781,"last_stable_checkpoint_block_num":125146601,"virtual_block_cpu_limit":400000000,"virtual_block_net_limit":1048576000,"block_cpu_limit":399900,"block_net_limit":1048576,"server_version_string":"v3.0.4"} ------------------------------- "" Enter passphrase to decrypt your vault: ------------------------------- POST /v1/chain/get_required_keys HTTP/1.1 Host: achain.hpe.net.cn:8888 {"available_keys":["EOS7HxPMkfyL69PqLXduP9YfuvVad8e3Nry6ryDGaJ2u8BKB2zUUm"],"transaction":{"expiration":"2022-01-27T10:07:19","ref_block_num":38470,"ref_block_prefix":2877636176,"max_net_usage_words":0,"max_cpu_usage_ms":0,"delay_sec":0,"context_free_actions":[],"actions":[{"account":"hello","name":"hi","authorization":[{"actor":"alice","permission":"active"}],"data":"0000000000855c34"}],"transaction_extensions":[]}} RESPONSE: http: ContentLength=75 with Body length 0 ------------------------------- {"required_keys":["EOS7HxPMkfyL69PqLXduP9YfuvVad8e3Nry6ryDGaJ2u8BKB2zUUm"]} ------------------------------- "" ------------------------------- POST /v1/chain/push_transaction HTTP/1.1 Host: achain.hpe.net.cn:8888 {"signatures":["SIG_K1_KZ4H2HhcTyBDoVkTQCkirY7oBJZCDxtpr2R98yUu7KVh9fR1m9FvWaaaeCXManhNa49MkTbb1AGGDCYb7nSKm63yRn78af"],"compression":"none","packed_context_free_data":"","packed_trx":"d76ef2614696503e85ab000000000100000000001aa36a000000000000806b010000000000855c3400000000a8ed3232080000000000855c3400"} RESPONSE: http: ContentLength=1096 with Body length 0 ------------------------------- {"transaction_id":"ee4244c5c4d8ab33296db70407e2c6dd1ca59c359d74f254d1cfa1a8bc8e0d80","processed":{"id":"ee4244c5c4d8ab33296db70407e2c6dd1ca59c359d74f254d1cfa1a8bc8e0d80","block_num":125146710,"block_time":"2022-01-27T10:06:50.000","producer_block_id":null,"receipt":{"status":"executed","cpu_usage_us":243,"net_usage_words":13},"elapsed":243,"net_usage":104,"scheduled":false,"action_traces":[{"receipt":{"receiver":"hello","act_digest":"a8236da5ebbccf570b832239fb51697e585bf137df503d4880a79023460fd4b0","global_sequence":206496215,"recv_sequence":10112,"auth_sequence":[["alice",9511]],"code_sequence":42,"abi_sequence":33},"act":{"account":"hello","name":"hi","authorization":[{"actor":"alice","permission":"active"}],"data":{"user":"alice"},"hex_data":"0000000000855c34"},"context_free":false,"elapsed":44,"console":"get_first_receiver()=helloHello, alice","trx_id":"ee4244c5c4d8ab33296db70407e2c6dd1ca59c359d74f254d1cfa1a8bc8e0d80","block_num":125146710,"block_time":"2022-01-27T10:06:50.000","producer_block_id":null,"account_ram_deltas":[],"except":null,"inline_traces":[]}],"except":null}} ------------------------------- "" Transaction submitted to the network. ee4244c5c4d8ab33296db70407e2c6dd1ca59c359d74f254d1cfa1a8bc8e0d80 ``` # 创建离线交易文件 ``` root@VM-0-5-ubuntu:/opt/eosc-bin# eosc tx create hello hi '{"user":"alice"}' -u http://achain.hpe.net.cn:3921 -p alice -u http://achain.hpe.net.cn:8888 --write-transaction tx.json --offline-chain-id 4a2fb7b7aacce5ea952dc96fbac6ed648efc08c1e1577882f3f33c82da248d63 --debug --offline-sign-key EOS7HxPMkfyL69PqLXduP9YfuvVad8e3Nry6ryDGaJ2u8BKB2zUUm --offline-head-block 07758c2c063ee4824ec8382c18d9553bb9ed2d5963aaf049b973b2b9bf65c4f0 ------------------------------- POST /v1/chain/abi_json_to_bin HTTP/1.1 Host: achain.hpe.net.cn:8888 {"action":"hi","args":{"user":"alice"},"code":"hello"} RESPONSE: http: ContentLength=30 with Body length 0 ------------------------------- {"binargs":"0000000000855c34"} ------------------------------- "" Enter passphrase to decrypt your vault: Transaction written to "tx.json" ``` 需要-u指定rpc api地址,因为需要用到abi_json_to_bin序列化action参数