Skip to content

Commit

Permalink
[address32]update create account move script and faucet
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand authored and aptos-bot committed Mar 31, 2022
1 parent c81e0b3 commit 70f68ed
Show file tree
Hide file tree
Showing 62 changed files with 298 additions and 447 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"code": 400,
"message": "invalid request body: invalid UserTransactionRequest: parse arguments[1] failed, expect string<hex>, caused by error: invalid type: map, expected a string"
"message": "invalid request body: invalid UserTransactionRequest: expected 1 arguments [string<address>], but got 2 ([String(\"0x00000000000000000000000001234567\"), Object({})])"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"code": 400,
"message": "invalid request body: invalid UserTransactionRequest: parse arguments[1] failed, expect string<hex>, caused by error: decode hex-encoded string(\"0xZZZ\") failed, caused by error: Odd number of digits"
"message": "invalid request body: invalid UserTransactionRequest: expected 1 arguments [string<address>], but got 2 ([String(\"0x00000000000000000000000001234567\"), String(\"0xZZZ\")])"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"code": 400,
"message": "Request body deserialize error: invalid script function id \"invalid\" at line 1 column 363"
"message": "Request body deserialize error: invalid script function id \"invalid\" at line 1 column 294"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"code": 400,
"message": "Request body deserialize error: deserialize Move type failed, invalid type: boolean `true`, expected a string at line 1 column 393"
"message": "Request body deserialize error: deserialize Move type failed, invalid type: boolean `true`, expected a string at line 1 column 324"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"code": 400,
"message": "invalid request body: invalid UserTransactionRequest: expected 2 arguments [string<address>, string<hex>], but got 1 ([String(\"0\")])"
"message": "invalid request body: invalid UserTransactionRequest: parse arguments[0] failed, expect string<address>, caused by error: invalid account address \"0\""
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"type": "block_metadata_transaction",
"version": "1",
"hash": "0xa8fc186c28fc0f95b8233651438093e8e215a51dcd16475f5e68c0a421f6305c",
"state_root_hash": "0x47e66df6c4346a09488f2cd570eca2beaea623de53ad63d404ac504a4f160bf2",
"state_root_hash": "0xd6018f057609dc4ee10cc2c185171c5a3ac6fd2dc5ff74f0b84e882cfc2177b4",
"event_root_hash": "0xd62c85b93234824cf825e9c028c3bcc59b06926039721bd7edd76b56ae9fcecf",
"gas_used": "0",
"success": true,
"vm_status": "Executed successfully",
"accumulator_root_hash": "0x4cb752665ff9180996eb108ed921b984f1933db6be7ef34106dc497579c80a47",
"accumulator_root_hash": "0x85ca98a0817dabdf661389fd5b101a7bc5537f9d8686f91f672191c0ec13106d",
"id": "0xf44b581f23222c10916b17a369b4da039d075952b58036f2a7b561446592403c",
"round": "1",
"previous_block_votes": [],
Expand All @@ -18,13 +18,13 @@
{
"type": "user_transaction",
"version": "2",
"hash": "0xe2da564dd4cc390409547bcbcf328dae17e5138e5ad0364f22fa5601958ba92c",
"state_root_hash": "0x2da4cacd6789c85033e3da9a5d39184e8b3d589d759ed3780ef1691d443b5f97",
"hash": "0x7ecd26dfe2d314f8fc5b5e5ecd0fb64dfd341755f025759e8bb5226441068523",
"state_root_hash": "0xa5958c0f688eb00736804061907782d0425aa04b974fadca0302fb4bde0be720",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "706",
"gas_used": "98",
"success": true,
"vm_status": "Executed successfully",
"accumulator_root_hash": "0xa4cde0ff09cf067cb1f663efe078dee2488a560fb5e2572fd1d04e72cae686e0",
"accumulator_root_hash": "0x6ebec5317a0ea4584cb51bb1745bcffcd4bdd8526266c1d2aad1d9837f2c4cc8",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand All @@ -36,14 +36,13 @@
"function": "0x1::AptosAccount::create_account",
"type_arguments": [],
"arguments": [
"0xe60912ecb0a8c365d163d258f3b9f1b62f8f9148c207643864d7ed4a2b23159",
"0xafb4905e9550cf462a82007824a055d975ae934470c477d9ddbb6d2b264c36fa00"
"0xe60912ecb0a8c365d163d258f3b9f1b62f8f9148c207643864d7ed4a2b23159"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0xb9c6ee1630ef3e711144a648db06bbb2284f7274cfbee53ffcee503cc1a49200",
"signature": "0x021450fbdc137e1c7ba154aad80a2c0d25a13ee1b131b7ce0d3975b6d0ef603ae575f1a1e34d820548474b6e2fc118922013ca9b71859e2efdbdb70982a4160e"
"signature": "0x548c63afe26a0d2ca89dcac950e073510d6185fbe9cb1e835d14381e41907609497664c1532ed639c211b92ccd28c18fa9b8fceacf5c17e3b3da64499edb900d"
},
"events": [],
"timestamp": "1"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0x94ea91ca86dabbe323c8d6ce9dccaa981e713dee84ef5b649a519a11f0688efb",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0x97e011afcd6d450db4943351dc0302d0078b86ddb37620af151c9fa51700de7f",
"accumulator_root_hash": "0x7f5667b508142613b26828a378d2320dff5f8aa1394858325529200158866d7f",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0xf041614384c1fa1041c41d09e03165de1894c9d0fd4a0bef27aa74d5c5e1edf7",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0xf0f6aa5912f21ef42c35c75c60df569607ffd3b9a341e7fd85a878408ee9d8f6",
"accumulator_root_hash": "0x12766da7ccac5a0403e20d580108c9b7245b04f4403f61be86b6c947d22e00e1",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0xcb16d12010be8372e54b392756d4b8f586a6817de83d6fe5b17cf04ee9e184ea",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0x8d2b519f59b3b0aa4ce4ec1d9a6080e6d24c3e2e85a60c525fab29ee95b97c0e",
"accumulator_root_hash": "0x84e829c3ad134313231bfb1a9874c86239d3b16999cc0ce920079412182cd953",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0x7e7cce0816c8893b387ee9df6639b76057b451fa2ee7fad79b150d1e5ab39972",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0xdb18f8f83c6489eb763410751cb0a56d27aa7fd2f8eb1aac59bbf7b1a5a95f98",
"accumulator_root_hash": "0x58220eb2d88fc0255bac494718612d998925c78f5ac2b8fceb9200fb7991cb1f",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0x2d05462ffbbe304c481df68b280819469adb3ccc88573121ce445c867a4a5e5a",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0x6d829600b4e4ed4f9a960c5ac66eaad7c266ebb665b0c421d3ff2c312dadfc43",
"accumulator_root_hash": "0xd27ff54976f2a65f845aebd538b2bf8184df8d46cf74c5fabd063d0758c08e25",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0x1b45f833770dcd1bb69fb586b8367e459708e2cd4ba162110f8520b54794ab0f",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0x7c21acfc96e17a81768cdfd4078590422c46897d408ac3441a0b1b45a7477647",
"accumulator_root_hash": "0x90b0a9d10157e5d5a7680e0c26add40fc9d57eca6e16f138f8d2aef8d8ad7ae9",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "2",
"hash": "0x7d70c809eaed055de23cd99cc946954ebc3905e20dd1db0b6634dab13a3046f6",
"state_root_hash": "0x14f18c167feff0a437426ae8137e94d54573569ab6aca1dcb01796858a44a605",
"state_root_hash": "0xd926455448e0d11e97cc8716678722975387d6a8ad7c0c1d33ea893636c372f9",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "1",
"success": false,
"vm_status": "Move bytecode deserialization / verification failed, including script function not found or invalid arguments",
"accumulator_root_hash": "0x391453ff17e4cbf454faa419c8a9560cfcab140a3bdd8e53d489d382ffb7072c",
"accumulator_root_hash": "0x8bac3e2c512471902ed634b1e1b3176f65e2d1032855d2810df96f8f8f3a578e",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"type": "user_transaction",
"version": "4",
"hash": "0x02dbb80ed580f1c272fb0e41d18e4c5367c03f4bfad5b711d297037beda71f97",
"state_root_hash": "0x1cea1e9c172289d3e2395a6a649c094ef2b9b23230fccf8443f6bd16aff8e528",
"state_root_hash": "0x785f4401addb3b3ecb4f3293d1ea0719a543ad8c611053428b28cd7ee08fe435",
"event_root_hash": "0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000",
"gas_used": "21",
"success": false,
"vm_status": "Move abort: code 8 at 0000000000000000000000000000000000000000000000000000000000000001::TestCoin",
"accumulator_root_hash": "0xade31310294d4508e0f40c282372bf4592f266e4881a73dc818c9ea713419194",
"accumulator_root_hash": "0x910f0f0ad55f96f96d487dbaaeb477a9ee9548d523608c0aaf4bd4de324d4ad1",
"sender": "0xe60912ecb0a8c365d163d258f3b9f1b62f8f9148c207643864d7ed4a2b23159",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "pending_transaction",
"hash": "0xe2da564dd4cc390409547bcbcf328dae17e5138e5ad0364f22fa5601958ba92c",
"hash": "0x7ecd26dfe2d314f8fc5b5e5ecd0fb64dfd341755f025759e8bb5226441068523",
"sender": "0xa550c18",
"sequence_number": "0",
"max_gas_amount": "1000",
Expand All @@ -12,13 +12,12 @@
"function": "0x1::AptosAccount::create_account",
"type_arguments": [],
"arguments": [
"0xe60912ecb0a8c365d163d258f3b9f1b62f8f9148c207643864d7ed4a2b23159",
"0xafb4905e9550cf462a82007824a055d975ae934470c477d9ddbb6d2b264c36fa00"
"0xe60912ecb0a8c365d163d258f3b9f1b62f8f9148c207643864d7ed4a2b23159"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0xb9c6ee1630ef3e711144a648db06bbb2284f7274cfbee53ffcee503cc1a49200",
"signature": "0x021450fbdc137e1c7ba154aad80a2c0d25a13ee1b131b7ce0d3975b6d0ef603ae575f1a1e34d820548474b6e2fc118922013ca9b71859e2efdbdb70982a4160e"
"signature": "0x548c63afe26a0d2ca89dcac950e073510d6185fbe9cb1e835d14381e41907609497664c1532ed639c211b92ccd28c18fa9b8fceacf5c17e3b3da64499edb900d"
}
}
17 changes: 0 additions & 17 deletions api/src/tests/invalid_post_request_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ async fn test_invalid_script_function_argument_address_string() {
response_error_msg(req, current_function_name!()).await;
}

#[tokio::test]
async fn test_invalid_script_function_argument_hex_encoded_bytes_type() {
let mut req = signing_message_request();
req["payload"]["arguments"][1] = json!({});

response_error_msg(req, current_function_name!()).await;
}

#[tokio::test]
async fn test_invalid_script_function_argument_hex_string() {
let mut req = signing_message_request();
req["payload"]["arguments"][1] = json!("0xZZZ");

response_error_msg(req, current_function_name!()).await;
}

#[tokio::test]
async fn test_missing_script_function_arguments() {
let mut req = signing_message_request();
Expand Down Expand Up @@ -152,7 +136,6 @@ fn signing_message_request() -> Value {
],
"arguments": [
"0x00000000000000000000000001234567", // address
"0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69", // auth_key_image
]
}
})
Expand Down
3 changes: 0 additions & 3 deletions api/src/tests/transactions_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use aptos_types::{
};

use aptos_crypto::ed25519::Ed25519PrivateKey;
use aptos_types::transaction::authenticator::AuthenticationKeyPreimage;
use move_core_types::{
identifier::Identifier,
language_storage::{ModuleId, StructTag, TypeTag},
Expand Down Expand Up @@ -501,7 +500,6 @@ async fn test_signing_message_with_script_function_payload() {
let mut context = new_test_context(current_function_name!());
let account = context.gen_account();
let txn = context.create_user_account(&account);
let auth_preimage = AuthenticationKeyPreimage::ed25519(account.public_key());

let payload = json!({
"type": "script_function_payload",
Expand All @@ -510,7 +508,6 @@ async fn test_signing_message_with_script_function_payload() {
],
"arguments": [
account.address().to_hex_literal(), // new_account_address
format!("0x{}", hex::encode(auth_preimage.into_vec())), // auth_key
]
});
test_signing_message_with_payload(context, txn, payload).await;
Expand Down
Loading

0 comments on commit 70f68ed

Please sign in to comment.