From f8ccbc96ce5b6f25160a8c4e4570067d76432def Mon Sep 17 00:00:00 2001 From: satoshiotomakan <127754187+satoshiotomakan@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:52:36 +0100 Subject: [PATCH] [RVN]: Update block explorer (#3708) * [RVN]: Update block explorer * [Misc]: Fix Protobuf comments regarding U256 encoding --- registry.json | 2 +- src/proto/Aeternity.proto | 4 +-- src/proto/Aion.proto | 8 ++--- src/proto/Cardano.proto | 2 +- src/proto/EOS.proto | 4 +-- src/proto/Ethereum.proto | 30 +++++++++---------- src/proto/Filecoin.proto | 6 ++-- src/proto/Harmony.proto | 24 +++++++-------- src/proto/Icon.proto | 2 +- src/proto/NULS.proto | 4 +-- src/proto/Nebulas.proto | 18 +++++------ src/proto/Polkadot.proto | 14 ++++----- src/proto/Theta.proto | 6 ++-- src/proto/VeChain.proto | 2 +- src/proto/Zilliqa.proto | 4 +-- tests/chains/Ravencoin/TWCoinTypeTests.cpp | 4 +-- .../Ravencoin/TWRavencoinTransactionTests.cpp | 2 +- 17 files changed, 68 insertions(+), 68 deletions(-) diff --git a/registry.json b/registry.json index ca3f9cf2660..941c1312d0a 100644 --- a/registry.json +++ b/registry.json @@ -1593,7 +1593,7 @@ "publicKeyHasher": "sha256ripemd", "base58Hasher": "sha256d", "explorer": { - "url": "https://ravencoin.network", + "url": "https://blockbook.ravencoin.org", "txPath": "/tx/", "accountPath": "/address/" }, diff --git a/src/proto/Aeternity.proto b/src/proto/Aeternity.proto index fc501db4859..98c5fe5b28d 100644 --- a/src/proto/Aeternity.proto +++ b/src/proto/Aeternity.proto @@ -11,10 +11,10 @@ message SigningInput { // Address of the recipient with "ak_" prefix string to_address = 2; - // Amount (uint256, serialized little endian) + // Amount (uint256, serialized big endian) bytes amount = 3; - // Fee amount (uint256, serialized little endian) + // Fee amount (uint256, serialized big endian) bytes fee = 4; // Message, optional diff --git a/src/proto/Aion.proto b/src/proto/Aion.proto index 3df8e2d5679..f4ac15ce4e8 100644 --- a/src/proto/Aion.proto +++ b/src/proto/Aion.proto @@ -7,19 +7,19 @@ import "Common.proto"; // Input data necessary to create a signed transaction. message SigningInput { - // Nonce (uint256, serialized little endian) + // Nonce (uint256, serialized big endian) bytes nonce = 1; - // Gas price (uint256, serialized little endian) + // Gas price (uint256, serialized big endian) bytes gas_price = 2; - // Gas limit (uint256, serialized little endian) + // Gas limit (uint256, serialized big endian) bytes gas_limit = 3; // Recipient's address. string to_address = 4; - // Amount to send in wei (uint256, serialized little endian) + // Amount to send in wei (uint256, serialized big endian) bytes amount = 5; // Optional payload diff --git a/src/proto/Cardano.proto b/src/proto/Cardano.proto index d32bae5509b..e4581e9ab75 100644 --- a/src/proto/Cardano.proto +++ b/src/proto/Cardano.proto @@ -22,7 +22,7 @@ message TokenAmount { // The name of the asset (within the policy) string asset_name = 2; - // The amount (uint256, serialized little endian) + // The amount (uint256, serialized big endian) bytes amount = 3; // The name of the asset (hex encoded). Ignored if `asset_name` is set diff --git a/src/proto/EOS.proto b/src/proto/EOS.proto index f890a8c83d1..04bec8f5906 100644 --- a/src/proto/EOS.proto +++ b/src/proto/EOS.proto @@ -25,10 +25,10 @@ message Asset { // Input data necessary to create a signed transaction. message SigningInput { - // Chain id (uint256, serialized little endian) + // Chain id (uint256, serialized big endian) bytes chain_id = 1; - // Reference Block Id (uint256, serialized little endian) + // Reference Block Id (uint256, serialized big endian) bytes reference_block_id = 2; // Timestamp on the reference block diff --git a/src/proto/Ethereum.proto b/src/proto/Ethereum.proto index 52255fc6b0b..d3de8617ba8 100644 --- a/src/proto/Ethereum.proto +++ b/src/proto/Ethereum.proto @@ -9,7 +9,7 @@ import "Common.proto"; message Transaction { // Native coin transfer transaction message Transfer { - // Amount to send in wei (uint256, serialized little endian) + // Amount to send in wei (uint256, serialized big endian) bytes amount = 1; // Optional payload data @@ -21,7 +21,7 @@ message Transaction { // destination address (string) string to = 1; - // Amount to send (uint256, serialized little endian) + // Amount to send (uint256, serialized big endian) bytes amount = 2; } @@ -30,7 +30,7 @@ message Transaction { // Target of the approval string spender = 1; - // Amount to send (uint256, serialized little endian) + // Amount to send (uint256, serialized big endian) bytes amount = 2; } @@ -42,7 +42,7 @@ message Transaction { // Destination address string to = 2; - // ID of the token (uint256, serialized little endian) + // ID of the token (uint256, serialized big endian) bytes token_id = 3; } @@ -54,10 +54,10 @@ message Transaction { // Destination address string to = 2; - // ID of the token (uint256, serialized little endian) + // ID of the token (uint256, serialized big endian) bytes token_id = 3; - // The amount of tokens being transferred (uint256, serialized little endian) + // The amount of tokens being transferred (uint256, serialized big endian) bytes value = 4; bytes data = 5; @@ -65,7 +65,7 @@ message Transaction { // Generic smart contract transaction message ContractGeneric { - // Amount to send in wei (uint256, serialized little endian) + // Amount to send in wei (uint256, serialized big endian) bytes amount = 1; // Contract call payload data @@ -78,7 +78,7 @@ message Transaction { // Recipient addresses. string address = 1; - // Amounts to send in wei (uint256, serialized little endian) + // Amounts to send in wei (uint256, serialized big endian) bytes amount = 2; // Contract call payloads data @@ -136,28 +136,28 @@ message UserOperation { // Input data necessary to create a signed transaction. // Legacy and EIP2718/EIP1559 transactions supported, see TransactionMode. message SigningInput { - // Chain identifier (uint256, serialized little endian) + // Chain identifier (uint256, serialized big endian) bytes chain_id = 1; - // Nonce (uint256, serialized little endian) + // Nonce (uint256, serialized big endian) bytes nonce = 2; // Transaction version selector: Legacy or enveloped, has impact on fee structure. // Default is Legacy (value 0) TransactionMode tx_mode = 3; - // Gas price (uint256, serialized little endian) + // Gas price (uint256, serialized big endian) // Relevant for legacy transactions only (disregarded for enveloped/EIP1559) bytes gas_price = 4; - // Gas limit (uint256, serialized little endian) + // Gas limit (uint256, serialized big endian) bytes gas_limit = 5; - // Maximum optional inclusion fee (aka tip) (uint256, serialized little endian) + // Maximum optional inclusion fee (aka tip) (uint256, serialized big endian) // Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) bytes max_inclusion_fee_per_gas = 6; - // Maximum fee (uint256, serialized little endian) + // Maximum fee (uint256, serialized big endian) // Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) bytes max_fee_per_gas = 7; @@ -180,7 +180,7 @@ message SigningOutput { // Signed and encoded transaction bytes. bytes encoded = 1; - // The V, R, S components of the resulting signature, (each uint256, serialized little endian) + // The V, R, S components of the resulting signature, (each uint256, serialized big endian) bytes v = 2; bytes r = 3; bytes s = 4; diff --git a/src/proto/Filecoin.proto b/src/proto/Filecoin.proto index f43b2d1d6e5..09a26ce03a4 100644 --- a/src/proto/Filecoin.proto +++ b/src/proto/Filecoin.proto @@ -25,16 +25,16 @@ message SigningInput { // Transaction nonce. uint64 nonce = 3; - // Transfer value (uint256, serialized little endian) + // Transfer value (uint256, serialized big endian) bytes value = 4; // Gas limit. int64 gas_limit = 5; - // Gas fee cap (uint256, serialized little endian) + // Gas fee cap (uint256, serialized big endian) bytes gas_fee_cap = 6; - // Gas premium (uint256, serialized little endian) + // Gas premium (uint256, serialized big endian) bytes gas_premium = 7; // Message params. diff --git a/src/proto/Harmony.proto b/src/proto/Harmony.proto index 8d341e7ebe1..85852dbc348 100644 --- a/src/proto/Harmony.proto +++ b/src/proto/Harmony.proto @@ -7,7 +7,7 @@ import "Common.proto"; // Input data necessary to create a signed transaction. message SigningInput { - // Chain identifier (uint256, serialized little endian) + // Chain identifier (uint256, serialized big endian) bytes chain_id = 1; // The secret private key used for signing (32 bytes). @@ -39,28 +39,28 @@ message SigningOutput { // A Transfer message message TransactionMessage { - // Nonce (uint256, serialized little endian) + // Nonce (uint256, serialized big endian) bytes nonce = 1; - // Gas price (uint256, serialized little endian) + // Gas price (uint256, serialized big endian) bytes gas_price = 2; - // Gas limit (uint256, serialized little endian) + // Gas limit (uint256, serialized big endian) bytes gas_limit = 3; // Recipient's address. string to_address = 4; - // Amount to send in wei (uint256, serialized little endian) + // Amount to send in wei (uint256, serialized big endian) bytes amount = 5; // Optional payload bytes payload = 6; - // From shard ID (uint256, serialized little endian) + // From shard ID (uint256, serialized big endian) bytes from_shard_id = 7; - // To Shard ID (uint256, serialized little endian) + // To Shard ID (uint256, serialized big endian) bytes to_shard_id = 8; } @@ -75,13 +75,13 @@ message StakingMessage { DirectiveCollectRewards collect_rewards = 5; } - // Nonce (uint256, serialized little endian) + // Nonce (uint256, serialized big endian) bytes nonce = 6; - // Gas price (uint256, serialized little endian) + // Gas price (uint256, serialized big endian) bytes gas_price = 7; - // Gas limit (uint256, serialized little endian) + // Gas limit (uint256, serialized big endian) bytes gas_limit = 8; } @@ -156,7 +156,7 @@ message DirectiveDelegate { // Validator address string validator_address = 2; - // Delegate amount (uint256, serialized little endian) + // Delegate amount (uint256, serialized big endian) bytes amount = 3; } @@ -168,7 +168,7 @@ message DirectiveUndelegate { // Validator address string validator_address = 2; - // Undelegate amount (uint256, serialized little endian) + // Undelegate amount (uint256, serialized big endian) bytes amount = 3; } diff --git a/src/proto/Icon.proto b/src/proto/Icon.proto index 9c19fbe6ec4..9b378f4dc82 100644 --- a/src/proto/Icon.proto +++ b/src/proto/Icon.proto @@ -13,7 +13,7 @@ message SigningInput { // Recipient address. string to_address = 2; - // Transfer amount (uint256, serialized little endian) + // Transfer amount (uint256, serialized big endian) bytes value = 3; // The amount of step to send with the transaction. diff --git a/src/proto/NULS.proto b/src/proto/NULS.proto index 2ee273d7824..7bfe9d62238 100644 --- a/src/proto/NULS.proto +++ b/src/proto/NULS.proto @@ -37,7 +37,7 @@ message TransactionCoinTo { // ID of the asset uint32 assets_id = 3; - // transaction amount (uint256, serialized little endian) + // transaction amount (uint256, serialized big endian) bytes id_amount = 4; // lock time @@ -97,7 +97,7 @@ message SigningInput { // Destination address string to = 3; - // Transfer amount (uint256, serialized little endian) + // Transfer amount (uint256, serialized big endian) bytes amount = 4; // Chain ID diff --git a/src/proto/Nebulas.proto b/src/proto/Nebulas.proto index ea915410d59..215bd503495 100644 --- a/src/proto/Nebulas.proto +++ b/src/proto/Nebulas.proto @@ -8,25 +8,25 @@ message SigningInput { // sender's address. string from_address = 1; - // Chain identifier (uint256, serialized little endian) + // Chain identifier (uint256, serialized big endian) bytes chain_id = 2; - // Nonce (uint256, serialized little endian) + // Nonce (uint256, serialized big endian) bytes nonce = 3; - // Gas price (uint256, serialized little endian) + // Gas price (uint256, serialized big endian) bytes gas_price = 4; - // Gas limit (uint256, serialized little endian) + // Gas limit (uint256, serialized big endian) bytes gas_limit = 5; // Recipient's address. string to_address = 6; - // Amount to send in wei, 1 NAS = 10^18 Wei (uint256, serialized little endian) + // Amount to send in wei, 1 NAS = 10^18 Wei (uint256, serialized big endian) bytes amount = 7; - // Timestamp to create transaction (uint256, serialized little endian) + // Timestamp to create transaction (uint256, serialized big endian) bytes timestamp = 8; // Optional payload @@ -65,7 +65,7 @@ message RawTransaction { // destination address bytes to = 3; - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 4; // Nonce (should be larger than in the last transaction of the account) @@ -80,10 +80,10 @@ message RawTransaction { // chain ID (4 bytes) uint32 chain_id = 8; - // gas price (uint256, serialized little endian) + // gas price (uint256, serialized big endian) bytes gas_price = 9; - // gas limit (uint256, serialized little endian) + // gas limit (uint256, serialized big endian) bytes gas_limit = 10; // algorithm diff --git a/src/proto/Polkadot.proto b/src/proto/Polkadot.proto index b853bdf441c..c25ddbd019e 100644 --- a/src/proto/Polkadot.proto +++ b/src/proto/Polkadot.proto @@ -45,7 +45,7 @@ message Balance { // destination address string to_address = 1; - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 2; // max 32 chars @@ -105,7 +105,7 @@ message Staking { // controller ID (optional) string controller = 1; - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 2; // destination for rewards @@ -120,7 +120,7 @@ message Staking { // controller ID (optional) string controller = 1; - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 2; // destination for rewards @@ -135,7 +135,7 @@ message Staking { // Bond extra amount message BondExtra { - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 1; // call indices @@ -144,7 +144,7 @@ message Staking { // Unbond message Unbond { - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 1; // call indices @@ -153,7 +153,7 @@ message Staking { // Rebond message Rebond { - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 1; // call indices @@ -179,7 +179,7 @@ message Staking { // Chill and unbound message ChillAndUnbond { - // amount (uint256, serialized little endian) + // amount (uint256, serialized big endian) bytes value = 1; // call indices diff --git a/src/proto/Theta.proto b/src/proto/Theta.proto index 01e8ebdfff9..7191c6cc5ae 100644 --- a/src/proto/Theta.proto +++ b/src/proto/Theta.proto @@ -13,16 +13,16 @@ message SigningInput { /// Recipient address string to_address = 2; - /// Theta token amount to send in wei (uint256, serialized little endian) + /// Theta token amount to send in wei (uint256, serialized big endian) bytes theta_amount = 3; - /// TFuel token amount to send in wei (uint256, serialized little endian) + /// TFuel token amount to send in wei (uint256, serialized big endian) bytes tfuel_amount = 4; /// Sequence number of the transaction for the sender address uint64 sequence = 5; - /// Fee amount in TFuel wei for the transaction (uint256, serialized little endian) + /// Fee amount in TFuel wei for the transaction (uint256, serialized big endian) bytes fee = 6; /// The secret private key used for signing (32 bytes). diff --git a/src/proto/VeChain.proto b/src/proto/VeChain.proto index 62f641ad577..26d4086c1db 100644 --- a/src/proto/VeChain.proto +++ b/src/proto/VeChain.proto @@ -10,7 +10,7 @@ message Clause { /// Recipient address. string to = 1; - /// Transaction amount (uint256, serialized little endian) + /// Transaction amount (uint256, serialized big endian) bytes value = 2; /// Payload data. diff --git a/src/proto/Zilliqa.proto b/src/proto/Zilliqa.proto index 03e5e2167fa..4e4e661fc98 100644 --- a/src/proto/Zilliqa.proto +++ b/src/proto/Zilliqa.proto @@ -7,13 +7,13 @@ option java_package = "wallet.core.jni.proto"; message Transaction { // Transfer transaction message Transfer { - // Amount to send (uint256, serialized little endian) + // Amount to send (uint256, serialized big endian) bytes amount = 1; } // Generic contract call message Raw { - // Amount to send (uint256, serialized little endian) + // Amount to send (uint256, serialized big endian) bytes amount = 1; // Smart contract code diff --git a/tests/chains/Ravencoin/TWCoinTypeTests.cpp b/tests/chains/Ravencoin/TWCoinTypeTests.cpp index 2e7e0df55fb..38304931caa 100644 --- a/tests/chains/Ravencoin/TWCoinTypeTests.cpp +++ b/tests/chains/Ravencoin/TWCoinTypeTests.cpp @@ -25,8 +25,8 @@ TEST(TWRavencoinCoinType, TWCoinType) { ASSERT_EQ(0x7a, TWCoinTypeP2shPrefix(TWCoinTypeRavencoin)); ASSERT_EQ(0x0, TWCoinTypeStaticPrefix(TWCoinTypeRavencoin)); assertStringsEqual(symbol, "RVN"); - assertStringsEqual(txUrl, "https://ravencoin.network/tx/t123"); - assertStringsEqual(accUrl, "https://ravencoin.network/address/a12"); + assertStringsEqual(txUrl, "https://blockbook.ravencoin.org/tx/t123"); + assertStringsEqual(accUrl, "https://blockbook.ravencoin.org/address/a12"); assertStringsEqual(id, "ravencoin"); assertStringsEqual(name, "Ravencoin"); } diff --git a/tests/chains/Ravencoin/TWRavencoinTransactionTests.cpp b/tests/chains/Ravencoin/TWRavencoinTransactionTests.cpp index 161acf0d6c9..7c3c7da223e 100644 --- a/tests/chains/Ravencoin/TWRavencoinTransactionTests.cpp +++ b/tests/chains/Ravencoin/TWRavencoinTransactionTests.cpp @@ -81,7 +81,7 @@ TEST(RavencoinTransaction, LockScripts) { assertHexEqual(scriptData, "76a9149451f4546e09fc2e49ef9b5303924712ec2b038e88ac"); // P2SH - // https://ravencoin.network/api/tx/f600d07814677d1f60545c8f7f71260238595c4928d6fb87caa0f9dd732e9bb5 + // https://blockbook.ravencoin.org/tx/f600d07814677d1f60545c8f7f71260238595c4928d6fb87caa0f9dd732e9bb5 auto script2 = WRAP(TWBitcoinScript, TWBitcoinScriptLockScriptForAddress(STRING("rPWwn5h4QFZNaz1XmY39rc73sdYGGDdmq1").get(), TWCoinTypeRavencoin)); auto scriptData2 = WRAPD(TWBitcoinScriptData(script2.get()));