/network/options
POST https://rosetta.s0.b.hmny.io/network/options
Overview
This endpoint returns the version information and allowed network-specific types for a shard's NetworkIdentifier
on Harmony.
Note that not all shards support the same types/options.
Reference Rosetta Documentation
Harmony Specific Documentation
Version information:
rosetta_version
is the spec version that the node currently implements.node_version
is the version of the node program that is running the Rosetta service.
The 'allowed' types for the Harmony network:
operation_types
contains all the operations that can be done on the Harmony network:Operation Type Discription Supported Shard Gas
All submitted transactions will incur an implicit gas operation. However, some on-chain effects (such as undelegation payout, or cross-shard transaction payout) will not incur gas as it was paid by the submitted transaction that caused said effect. All NativeTransfer
This operation is for transferring native ONE tokens from one account to another in the same shard. All NativeTransfer
operations come in pairs, one operation deducting an amount from an account, and the other operation crediting said amount to an account. Moreover, the 2 operations are related in one (and only one) direction.All NativeCrossShardTransfer
his operation is for transferring native ONE tokens between different shards. Note that cross-shard transfer operations appear in pairs, but not in the same transaction/block. The first appearance will be on the submitted transaction on the source/from shard. The second appearance will be on the destination/to shard. All ContractCreation
This operation creates/instantiates a smart contract. All ContractCreation
operations come in pairs, one operation deducting the native ONE tokens from the sender's account, the other operation crediting said amount to the contract's account (as dictated by the contract instantiation code).All Genesis
This is a special operation that is only valid for block 0. It indicates the initial funds of the shard. All UndelegationPayout
This is a special operation that is only present on the last block of an Epoch. It represents any delegated/locked native ONE tokens that are refunded to an account. Beacon (0) CreateValidator
This operation creates a validator on the Harmony network for the sender's account. Beacon (0) EditValidator
This operation edits the sender's validator information or election status (i.e: validator name and/or being eligible for election). Beacon (0) Delegate
This operation delegates (or re-delegates from pending undelegations) native ONE tokens from the sender's account to a validator's account. Beacon (0) Undelegate
This operation removes delegation from a validator. Note that this operation does not immediately unlock the sender's tokens. Beacon (0) CollectRewards
This operation credits all the staking rewards to the sender's account. Beacon (0) operation_statuses
contains all of the on-chain status for any of theoperation_types
on Harmony:Status Discription success
This indicates that the transaction's operation and associated EVM code was executed successfully. contract_failure
This indicates that the smart contract code associated with a transaction's operation failed to execute. failure
This indicates that a transaction's operation (not related to smart contract) failed. errors
contains all of the supported Rosetta errors:Code Discription 0 Catch all/fallback errors. 1 Sanity check errors. 2 Invalid network errors. 3 Plain transaction submission errors. 4 Staking transaction submission errors. 5 Block not found errors. 6 Plain or staking transaction not found errors. 7 Receipt not found errors. 8 Singing curve type not supported errors. 9 Invalid transaction construction errors. historical_balance_lookup
is only true for nodes running in archival mode.
Request Body
{"network_identifier"=>{"blockchain"=>"Harmony", "network"=>"Testnet", "sub_network_identifier"=>{"network"=>"shard 1", "metadata"=>{"is_beacon"=>false}}}}
RESPONSES
status: OK
{"version":{"rosetta_version":"1.4.6","node_version":"Harmony (C) 2020. harmony, version v6478-v2.3.7-121-g46bbe894 (jenkins@ 2020-10-28T12:53:59+0000)"},"allow":{"operation_statuses":[{"status":"success","successful":true},{"status":"failure","successful":false},{"status":"contract_failure","successful":false}],"operation_types":["Gas","NativeTransfer","NativeCrossShardTransfer","ContractCreation","Genesis","PreStakingBlockReward","UndelegationPayout","CreateValidator","EditValidator","Delegate","Undelegate","CollectRewards"],"errors":[{"code":0,"message":"catch all error","retriable":false},{"code":1,"message":"sanity check error","retriable":false},{"code":2,"message":"invalid network error","retriable":false},{"code":3,"message":"transaction submission error","retriable":true},{"code":5,"message":"block not found error","retriable":false},{"code":6,"message":"transaction or staking transaction not found","retriable":false},{"code":7,"message":"receipt not found","retriable":false},{"code":8,"message":"unsupported curve type","retriable":false},{"code":9,"message":"invalid transaction construction","retriable":false},{"code":4,"message":"staking transaction submission error","retriable":true}],"historical_balance_lookup":true}}