diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap index 037f1a9aff..ad3fba4685 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 72 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f424000000000000000010101010101010101010101010101010101010101010101010101010101010101000000000000000202020202020202020202020202020202020202020202020202020202020202020303030303030303030303030303030303030303030303030303030303030303000000000000002e00000000000000050505050505050505050505050505050505050505050505050505050505050505 +0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000010101010101010101010101010101010101010101010101010101010101010101000000000000000202020202020202020202020202020202020202020202020202020202020202020303030303030303030303030303030303030303030303030303030303030303000000000000002e00000000000000050505050505050505050505050505050505050505050505050505050505050505 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap.new deleted file mode 100644 index ad3fba4685..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_contract_snapshot.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 72 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000010101010101010101010101010101010101010101010101010101010101010101000000000000000202020202020202020202020202020202020202020202020202020202020202020303030303030303030303030303030303030303030303030303030303030303000000000000002e00000000000000050505050505050505050505050505050505050505050505050505050505050505 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap index 446f666e0b..460c7c45bf 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 53 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e00000000000000050000000000000000000000000000000200000000000186a0000000000000000a000000000000000c0303030303030303030300000000000004040404040404040404040400000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e00000000000000050000000000000000000000000000000200000000000186a0000000000000000a000000000000000c0303030303030303030300000000000004040404040404040404040400000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap.new deleted file mode 100644 index 460c7c45bf..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 53 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e00000000000000050000000000000000000000000000000200000000000186a0000000000000000a000000000000000c0303030303030303030300000000000004040404040404040404040400000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap index 48e7029780..52d41749cd 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 119 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a00000000000000000000000000000000b000000000000000c0707070707070707070707000000000008080808080808080808080800000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a00000000000000000000000000000000b000000000000000c0707070707070707070707000000000008080808080808080808080800000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap.new deleted file mode 100644 index 52d41749cd..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_coin.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 119 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a00000000000000000000000000000000b000000000000000c0707070707070707070707000000000008080808080808080808080800000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap index 6ab3374a9f..3aa24d66c4 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 166 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a0000000000000000a000000000000000b000000000000000c060606060606060606060000000000000707070707070707070707000000000008080808080808080808080800000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a0000000000000000a000000000000000b000000000000000c060606060606060606060000000000000707070707070707070707000000000008080808080808080808080800000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap.new deleted file mode 100644 index 3aa24d66c4..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_message_data.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 166 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b00000000000f424000000000000000020202020202020202020202020202020202020202020202020202020202020202030303030303030303030303030303030303030303030303030303030303030300000000000000040505050505050505050505050505050505050505050505050505050505050505000000000000000000000000000186a0000000000000000a000000000000000b000000000000000c060606060606060606060000000000000707070707070707070707000000000008080808080808080808080800000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap index e0542abfd0..605d4b0511 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 29 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000003e8000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e000000000000000500000000000000040000000000000002000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e000000000000000500000000000000040000000000000002000000000000000000000000000000000000000000000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap.new deleted file mode 100644 index 605d4b0511..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 29 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e000000000000000500000000000000040000000000000002000000000000000000000000000000000000000000000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap index e323d2bc5b..2ac3ff447f 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 96 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000000000000000000000000000000000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap.new deleted file mode 100644 index 2ac3ff447f..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_coin.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 96 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000000000000000000000000000000000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap index 3eedcb9eb0..e7210a8d1e 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap @@ -1,5 +1,6 @@ --- source: fuel-tx/src/transaction/types/input/snapshot_tests.rs +assertion_line: 143 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000a0000000000000000000000000000000007070707070707070707000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000a0000000000000000000000000000000007070707070707070707000000000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap.new b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap.new deleted file mode 100644 index e7210a8d1e..0000000000 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_message_data.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: fuel-tx/src/transaction/types/input/snapshot_tests.rs -assertion_line: 143 -expression: hex ---- -0000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000007b00000000000f42400000000000000002020202020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303030303030303030303030303030303030000000000000004050505050505050505050505050505050505050505050505050505050505050500000000000000060000000000000000000000000000000a0000000000000000000000000000000007070707070707070707000000000000 diff --git a/fuel-vm/src/interpreter/debug.rs b/fuel-vm/src/interpreter/debug.rs index 527131d62f..6a140456a2 100644 --- a/fuel-vm/src/interpreter/debug.rs +++ b/fuel-vm/src/interpreter/debug.rs @@ -71,7 +71,7 @@ fn breakpoint_script() { let mut vm = Interpreter::<_, _>::with_memory_storage(); let gas_limit = 1_000_000; - let arb_gas_price = 1; + let zero_gas_price = 0; let height = Default::default(); let script = [ @@ -91,7 +91,7 @@ fn breakpoint_script() { .script_gas_limit(gas_limit) .add_random_fee_input() .finalize() - .into_checked(height, &consensus_params, arb_gas_price) + .into_checked(height, &consensus_params, zero_gas_price) .expect("failed to generate checked tx"); let suite = vec![ @@ -116,7 +116,7 @@ fn breakpoint_script() { suite.iter().for_each(|(b, _)| vm.set_breakpoint(*b)); let state = vm - .transact(tx, arb_gas_price) + .transact(tx, zero_gas_price) .map(ProgramState::from) .expect("Failed to execute script!"); @@ -144,7 +144,7 @@ fn single_stepping() { let mut vm = Interpreter::<_, _>::with_memory_storage(); - let arb_gas_price = 1; + let zero_gas_price = 0; let gas_limit = 1_000_000; let height = Default::default(); @@ -165,13 +165,13 @@ fn single_stepping() { .script_gas_limit(gas_limit) .add_random_fee_input() .finalize() - .into_checked(height, &consensus_params, arb_gas_price) + .into_checked(height, &consensus_params, zero_gas_price) .expect("failed to generate checked tx"); vm.set_single_stepping(true); let mut state = vm - .transact(tx, arb_gas_price) + .transact(tx, zero_gas_price) .map(ProgramState::from) .expect("Failed to execute script!"); diff --git a/fuel-vm/src/interpreter/executors/instruction/tests/reserved_registers.rs b/fuel-vm/src/interpreter/executors/instruction/tests/reserved_registers.rs index 0519dabedb..1b9412453a 100644 --- a/fuel-vm/src/interpreter/executors/instruction/tests/reserved_registers.rs +++ b/fuel-vm/src/interpreter/executors/instruction/tests/reserved_registers.rs @@ -24,7 +24,7 @@ use quickcheck_macros::quickcheck; // Ensure none of the opcodes can write to reserved registers #[quickcheck] fn cant_write_to_reserved_registers(raw_random_instruction: u32) -> TestResult { - let arb_gas_price = 1; + let zero_gas_price = 0; let random_instruction = match Instruction::try_from(raw_random_instruction) { Ok(inst) => inst, @@ -67,7 +67,7 @@ fn cant_write_to_reserved_registers(raw_random_instruction: u32) -> TestResult { .finalize(); let tx = tx - .into_checked(block_height, &consensus_params, arb_gas_price) + .into_checked(block_height, &consensus_params, zero_gas_price) .expect("failed to check tx"); vm.init_script(tx).expect("Failed to init VM"); diff --git a/fuel-vm/src/tests/metadata.rs b/fuel-vm/src/tests/metadata.rs index 774bc23b01..d36b75b68d 100644 --- a/fuel-vm/src/tests/metadata.rs +++ b/fuel-vm/src/tests/metadata.rs @@ -275,7 +275,7 @@ fn get_transaction_fields() { let mut client = MemoryClient::default(); - let gas_price = 1; + let zero_gas_price = 0; let witness_limit = 1234; let max_fee_limit = 4321; let gas_limit = 10_000_000; @@ -296,9 +296,9 @@ fn get_transaction_fields() { let tx = TransactionBuilder::create(contract, salt, storage_slots) .add_output(Output::contract_created(contract_id, state_root)) .add_random_fee_input() - .finalize_checked(height, gas_price); + .finalize_checked(height, zero_gas_price); - client.deploy(tx, gas_price); + client.deploy(tx, zero_gas_price); let predicate = vec![op::ret(RegId::ONE)].into_iter().collect::>(); let mut predicate_data = vec![0u8; 512]; @@ -391,7 +391,7 @@ fn get_transaction_fields() { maturity, ) .add_output(Output::coin(rng.gen(), asset_amt, asset)) - .finalize_checked(height, gas_price); + .finalize_checked(height, zero_gas_price); let inputs = tx.as_ref().inputs(); let outputs = tx.as_ref().outputs(); @@ -469,11 +469,12 @@ fn get_transaction_fields() { op::eq(0x10, 0x10, 0x11), op::and(0x20, 0x20, 0x10), - op::movi(0x11, gas_price as Immediate18), - op::movi(0x19, 0x00), - op::gtf_args(0x10, 0x19, GTFArgs::PolicyTip), - op::eq(0x10, 0x10, 0x11), - op::and(0x20, 0x20, 0x10), + // TODO: Implement Tip stuff. + // op::movi(0x11, gas_price as Immediate18), + // op::movi(0x19, 0x00), + // op::gtf_args(0x10, 0x19, GTFArgs::PolicyTip), + // op::eq(0x10, 0x10, 0x11), + // op::and(0x20, 0x20, 0x10), op::movi(0x19, 0x00), op::movi(0x11, (gas_limit & 0x3ffff) as Immediate18), @@ -888,11 +889,15 @@ fn get_transaction_fields() { .script_gas_limit(gas_limit) .witness_limit(witness_limit) .max_fee_limit(max_fee_limit) - .finalize_checked_basic(height, gas_price); + .finalize_checked_basic(height, zero_gas_price); - let receipts = client.transact(tx, gas_price); + let receipts = client.transact(tx, zero_gas_price); let success = receipts .iter() + .map(|r| { + dbg!(&r); + r + }) .any(|r| matches!(r, Receipt::Log{ ra, .. } if ra == &1)); assert!(success);