Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor std::tx to use gtf intrinsic (FuelLabs#2482)
* feat: add all gtf const values * cleanup: remove offset consts and doc comments * refactor: update tx_type() * refactor: update tx_script_gas_price() * refactor: update tx_script_gas_limit() * refactor: update tx_maturity() * refactor: remove tx_byte_price() * refactor: update tx_script_length() * refactor: update tx_script_data_length() * refactor: update tx_inputs_count() * refactor: update tx_outputs_count() * refactor: update tx_witnesses_count() * refactor: update tx_receipts_root() * refactor: update tx_script_start_pointer() * refactor: update tx_script_data_start_pointer() * refactor: update tx_script_data() * refactor: update tx_script_bytecode() * refactor: update tx_input_pointer() * refactor: update & rename tx_input_type() * refactor: update tx_input_owner() * cleanup" remove redundant tx_input_type() function * refactor: update tx_predicate_data_start_pointer() * refactor: rename get_predicate_data() * refactor: update fn predicate_data() to be generic * feat: add fn tx_coin_predicate_data_start_pointer() * refactor: update tx_output_pointer() * refactor: update tx_output_type() * refactor: remove tx_output_type_from_pointer() * refactor: update tx_output_amount() * refactor: update fn tx_id() * refactor: hardcode index 0 for tx field getters * fix: refactor predicate_data & fix implementation * docs: add GTF hex values to function docs * docs: commment out consts and make into comments * Revert "docs: commment out consts and make into comments" This reverts commit bdca7bb. * cleanup * cleanup: consts * feat: add witness related functions to tx * feat: add mod inputs to std * Docs: Add high level module docs * refactor: remove unused imports * refactor: move all input consts to imputs.sw * refactor: remove input-related stuff from tx.sw * refactor: move inputs to inputs.sw * refactor: complete move of inputs * reafactor: input owner functions * refactor: move input predicate data func to inputs * refactor: extract 2 predicate data functions * feat: add fn input_coin_output_index * feat: add fn input_coin_amount() * chore: cleanup * refactor: switch to using __gtf intrinsic * fix: update calls to read() with turbofish * refactor: use read() consistently * fix: semicolon * fixup * refactor: make tx_gas_price() general-purpose * refactor: use gtf for fn tx_type() * refactor: make tx_gas_limit() general purpose * refactor: make tx_maturity() general purpose. * refactor: make tx_inputs_count() general purpose. * fix: use correct type for __gtf * refactor: fix tx_script length to return an option. * refactor: switch tx_script_data_length() to return option * refactor: update fn tx_outputs_count() to use gtf * refactor: make inputs/outputs count fns general * refactor: update fn tx_receipts_root() return type * refactor: update fn tx_script_data_start_pointer() return type * docs: add comments to tx_type() * chore: cleanup * feat: make fn tx_input_pointer() general purpose * fix: add GTF_OUTPUT_TYPE const * feat: refactor tx_id() to use gtf intrinsic * feat: refactor fn tx_input_type() to use gtf * refactor: switch fn tx_input_owner() to use gtf * refactor: make predicate_data() use gtf intrinsic * refactor: make tx_output_pointer() general purpose * refactor: use gtf intrinsic in tx_output_type() * refactor: update tx_output_amount() to use gtf * refactor: revert rather than returning None * feat: add fn tx_witness() * docs: add notes * fix: uncomment const GTF_OUTPUT_TYPE * refactor: change tx_type to return enum * fixup * refactor: rename tx_witness to tx_witness_pointer * refactor: add enum Output and modify tx_output_type * refactor: complete tx refactor with new enum types * refactor: update token.sw to handle enum returns from tx.sw * refactor: update auth.sw to handle enum returns from tx.sw * fix: update calls to read() * fix: add get_predicate_data() back * test: update tx_field tests * cleanup * refactor:start to move funcs to inputs module * refactor: split out all inputs related things * feat: add outputs module and refactor * cleanup * refactor: move & rename tx_outputs_count() * fix: changes to fix compile errors * fix: changes to fix compile errors * fix: update token & auth modules * fix: cleanup duplicate function * fix: update read() calls with type annotations * test: update tests to handles stdlib changes * chore: update test/ cargo manifest & lock * chore: update sdk-harness/ cargo manifest & tests * chore: update forc/ cargo manifest & lock * chore: update forc-pkg/ & sway-core/ cargo manifests & lock * chore: update sway-types/ cargo manifest & lock * chore: update test-sig-gen-util/ cargo manifest & lock * chore: update fuel-core in ci.yaml * cleanup: remove x.. opcodes from allocated_ops.rs * fix: complete removal of X.. opcodes from allocated_ops * chore: remove X.. opcodes from virtual_ops and mod.rs * resolve type annotation * refactor: remove byte_price & static_contracts * chore: bump fuel-core to 0.10.1 in ci.yml * fix: trying to update harness.rs in e2e tests * chore: add builder feature to fuel-tx dep * test: fix test harness * style: clippy * fix: remove X.. opcodes from op_codes.rs * fix: remove X.. opcodes from sway-parse/op_codes * fix: remove byte_price from parameters.rs * chore: commit updated cargo lockfile * fix: improve fn naming consistency * test: set index to 0 * chore: update lockfile * test: fix tests to work with patched SDK * chore: restore cargo manifest file to patchless version * test: update auth testing contract * test: update tx_fields tests * chore: patch SDK with local branch * temp: add logging to repro while-loop bug * fixup: temp logs * chore: bump to SDK v0.21 * test: update tests to use new wallet api * chore: bump forc-util * chore: fix merge-conflict in cargo.lock * test: fix some tx_field tests * cleanup * test: cleanup tx_output_type test * Remove unused deps * Remove more unused deps * Restore some deps * Fix can_get_script_start_offset test * fix get_tx_id test * fix can_get_tx_output_type test * Fix can_get_tx_input_coin_owner test * Disable mint/transfer tests and hopefully resolve the unused deps issue * Re-enable the token tests as they actually work now with a fix to token.sw * Some clean up and removing untested functions * Add some useful comments and return None as the owner of a message input * remove dead constants * fmt * update the lock file * Update the SDK version for forc new * cleanup: remove logging from token.sw * cleanup: remove stale TODO from test * style: consolidate imports in test file * Update comments for output_amount to point to a github issue * Using if let instead of a match statement * Link to github issue for testing * Update some constants based on the old spec until the new spec is implemented Co-authored-by: Alex Hansen <[email protected]> Co-authored-by: Mohammad Fawaz <[email protected]> Co-authored-by: João Matos <[email protected]>
- Loading branch information