From 304113eba25dd60965ea6e02300d9253d30d098f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Bilge=20Yal=C3=A7=C4=B1nkaya?= Date: Mon, 21 Aug 2023 21:41:48 +0300 Subject: [PATCH] Foundry-like tests (#111) * experiments for foundry-like parametric tests * TestAdder contract and api functions * basic foundry semantics * run-elrond-tests.py => run_elrond_tests.py * WrappedBytes in MapBytesToBytes and ListBytes * test-adder.wat:keep function names * add initial script to run tests with concrete execution * add property-based testing with hypothesis * temp * temp * add claim generator * add error cases for foundry rules * multisig test * increase recursion limit * foundryGetStorage returns empty bytes if not found * use _kast for parsing/unparsing * fix wrapped bytes * after review: cleanup and add types * make testapi.rs a cargo package * codeHandle => codePathHandle * fix recursion limit and refactor kast/krun * add foundry tutorial to README.md * split foundry assert rule * implement foundry assume without ensures --- .gitignore | 2 + Makefile | 36 +- README.md | 136 +- data/bytes-type.k | 11 + data/list-bytes.k | 47 +- data/map-bytes-to-bytes.k | 77 +- elrond-config.md | 8 +- foundry.md | 327 +++ mandos.md | 10 +- run-elrond-tests.py => run_elrond_tests.py | 34 +- run_foundry.py | 493 ++++ src/testapi/Cargo.toml | 15 + src/testapi/src/testapi.rs | 172 ++ tests/contracts/foundrylike/.gitignore | 7 + tests/contracts/foundrylike/Cargo.lock | 2344 ++++++++++++++++ tests/contracts/foundrylike/Cargo.toml | 21 + tests/contracts/foundrylike/foundry.json | 5 + tests/contracts/foundrylike/meta/Cargo.lock | 860 ++++++ tests/contracts/foundrylike/meta/Cargo.toml | 14 + tests/contracts/foundrylike/meta/src/main.rs | 3 + tests/contracts/foundrylike/multiversx.json | 3 + .../foundrylike/output/test-adder.wat | 445 +++ .../scenarios/test-adder.scen.json | 71 + tests/contracts/foundrylike/src/test_adder.rs | 91 + tests/contracts/foundrylike/wasm/Cargo.lock | 227 ++ tests/contracts/foundrylike/wasm/Cargo.toml | 27 + tests/contracts/foundrylike/wasm/src/lib.rs | 26 + tests/contracts/test_multisig/.gitignore | 7 + tests/contracts/test_multisig/Cargo.lock | 2399 +++++++++++++++++ tests/contracts/test_multisig/Cargo.toml | 21 + tests/contracts/test_multisig/foundry.json | 5 + tests/contracts/test_multisig/meta/Cargo.lock | 863 ++++++ tests/contracts/test_multisig/meta/Cargo.toml | 14 + .../contracts/test_multisig/meta/src/main.rs | 3 + tests/contracts/test_multisig/multiversx.json | 3 + .../test_multisig/src/test_multisig.rs | 134 + tests/contracts/test_multisig/wasm/Cargo.lock | 227 ++ tests/contracts/test_multisig/wasm/Cargo.toml | 27 + tests/contracts/test_multisig/wasm/src/lib.rs | 26 + tests/simple/bad-bounds.wast | 12 +- tests/simple/host-calls.wast | 8 +- vmhooks/baseOps.md | 23 +- vmhooks/bigIntOps.md | 11 +- vmhooks/manBufOps.md | 9 +- vmhooks/smallIntOps.md | 4 +- vmhooks/utils.md | 5 +- 46 files changed, 9190 insertions(+), 123 deletions(-) create mode 100644 data/bytes-type.k create mode 100644 foundry.md rename run-elrond-tests.py => run_elrond_tests.py (95%) create mode 100644 run_foundry.py create mode 100644 src/testapi/Cargo.toml create mode 100644 src/testapi/src/testapi.rs create mode 100644 tests/contracts/foundrylike/.gitignore create mode 100644 tests/contracts/foundrylike/Cargo.lock create mode 100644 tests/contracts/foundrylike/Cargo.toml create mode 100644 tests/contracts/foundrylike/foundry.json create mode 100644 tests/contracts/foundrylike/meta/Cargo.lock create mode 100644 tests/contracts/foundrylike/meta/Cargo.toml create mode 100644 tests/contracts/foundrylike/meta/src/main.rs create mode 100644 tests/contracts/foundrylike/multiversx.json create mode 100644 tests/contracts/foundrylike/output/test-adder.wat create mode 100644 tests/contracts/foundrylike/scenarios/test-adder.scen.json create mode 100644 tests/contracts/foundrylike/src/test_adder.rs create mode 100644 tests/contracts/foundrylike/wasm/Cargo.lock create mode 100644 tests/contracts/foundrylike/wasm/Cargo.toml create mode 100644 tests/contracts/foundrylike/wasm/src/lib.rs create mode 100644 tests/contracts/test_multisig/.gitignore create mode 100644 tests/contracts/test_multisig/Cargo.lock create mode 100644 tests/contracts/test_multisig/Cargo.toml create mode 100644 tests/contracts/test_multisig/foundry.json create mode 100644 tests/contracts/test_multisig/meta/Cargo.lock create mode 100644 tests/contracts/test_multisig/meta/Cargo.toml create mode 100644 tests/contracts/test_multisig/meta/src/main.rs create mode 100644 tests/contracts/test_multisig/multiversx.json create mode 100644 tests/contracts/test_multisig/src/test_multisig.rs create mode 100644 tests/contracts/test_multisig/wasm/Cargo.lock create mode 100644 tests/contracts/test_multisig/wasm/Cargo.toml create mode 100644 tests/contracts/test_multisig/wasm/src/lib.rs diff --git a/.gitignore b/.gitignore index 5190123f..162fb291 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ .kompile* *.pyc +venv +.hypothesis \ No newline at end of file diff --git a/Makefile b/Makefile index 9c76465d..e21d7051 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean deps wasm-deps \ - build build-llvm build-haskell \ - plugin-deps libff libcryptopp libsecp256k1 \ + build build-llvm build-haskell build-foundry \ + plugin-deps libff libcryptopp libsecp256k1 \ elrond-clean-sources elrond-loaded \ test unittest-python mandos-test test-elrond-contracts \ test-elrond-adder test-elrond-crowdfunding-esdt \ @@ -111,7 +111,9 @@ $(libsecp256k1_out): $(PLUGIN_SUBMODULE)/deps/secp256k1/autogen.sh && $(MAKE) \ && $(MAKE) install -plugin-deps: libff libcryptopp libsecp256k1 +PLUGIN_DEPS := $(libff_out) $(libcryptopp_out) $(libsecp256k1_out) + +plugin-deps: $(PLUGIN_DEPS) # Build Dependencies (K Submodule) # -------------------------------- @@ -136,7 +138,7 @@ endif LLVM_KOMPILE_OPTS := -L$(LOCAL_LIB) \ -I$(LOCAL_INCLUDE) \ -I/usr/include \ - $(PLUGIN_SUBMODULE)/plugin-c/plugin_util.cpp \ + $(PLUGIN_SUBMODULE)/plugin-c/plugin_util.cpp \ $(PLUGIN_SUBMODULE)/plugin-c/crypto.cpp \ $(PLUGIN_SUBMODULE)/plugin-c/blake2.cpp \ -g -std=c++17 -lff -lcryptopp -lsecp256k1 \ @@ -152,6 +154,7 @@ ELROND_FILE_NAMES := elrond.md \ esdt.md \ auto-allocate.md \ mandos.md \ + foundry.md \ $(wildcard data/*.k) \ $(wildcard vmhooks/*.md) @@ -170,7 +173,7 @@ llvm_kompiled := $(llvm_dir)/mandos-kompiled/interpreter build-llvm: $(llvm_kompiled) -$(llvm_kompiled): $(ELROND_FILES_KWASM_DIR) $(PLUGIN_FILES_KWASM_DIR) plugin-deps +$(llvm_kompiled): $(ELROND_FILES_KWASM_DIR) $(PLUGIN_FILES_KWASM_DIR) $(PLUGIN_DEPS) $(KWASM_MAKE) build-llvm \ DEFN_DIR=../../$(DEFN_DIR)/$(SUBDEFN) \ llvm_main_module=$(MAIN_MODULE) \ @@ -178,8 +181,8 @@ $(llvm_kompiled): $(ELROND_FILES_KWASM_DIR) $(PLUGIN_FILES_KWASM_DIR) plugin-dep llvm_main_file=$(MAIN_DEFN_FILE) \ EXTRA_SOURCE_FILES="$(EXTRA_SOURCES)" \ KOMPILE_OPTS="$(KOMPILE_OPTS)" \ - LLVM_KOMPILE_OPTS="$(LLVM_KOMPILE_OPTS)" \ - K_INCLUDE_DIR=$(K_INCLUDE_DIR) + LLVM_KOMPILE_OPTS="$(LLVM_KOMPILE_OPTS)" \ + K_INCLUDE_DIR=$(K_INCLUDE_DIR) $(KWASM_SUBMODULE)/%.md: %.md cp $< $@ @@ -196,6 +199,23 @@ $(KWASM_SUBMODULE)/data/%.k: data/%.k @mkdir -p $(dir $@) cp $< $@ +# Foundry Build +foundry_kompiled := $(llvm_dir)/foundry-kompiled/interpreter + +build-foundry: $(foundry_kompiled) + +# runs llvm-kompile separately to reduce max memory usage +$(foundry_kompiled): $(ELROND_FILES_KWASM_DIR) $(PLUGIN_FILES_KWASM_DIR) $(PLUGIN_DEPS) + $(KWASM_MAKE) build-llvm \ + DEFN_DIR=../../$(DEFN_DIR)/$(SUBDEFN) \ + llvm_main_module=FOUNDRY \ + llvm_syntax_module=FOUNDRY-SYNTAX \ + llvm_main_file=foundry \ + EXTRA_SOURCE_FILES="$(EXTRA_SOURCES)" \ + KOMPILE_OPTS="$(KOMPILE_OPTS)" \ + LLVM_KOMPILE_OPTS="$(LLVM_KOMPILE_OPTS)" \ + K_INCLUDE_DIR=$(K_INCLUDE_DIR) + # Testing # ------- @@ -243,7 +263,7 @@ $(ELROND_LOADED_JSON): $(ELROND_RUNTIME) # Elrond Tests # ------------ -TEST_MANDOS := python3 run-elrond-tests.py +TEST_MANDOS := python3 run_elrond_tests.py ## Mandos Test diff --git a/README.md b/README.md index 89c118b2..98730b2d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Semantics of Elrond and Mandos This repository is work-in-progress, and currently a fork of [KWasm](https://github.com/kframework/wasm-semantics). -Elrond-specific code is in `elrond.md` and `run-elrond-tests.py`. +Elrond-specific code is in `elrond.md` and `run_elrond_tests.py`. ## Installation @@ -53,10 +53,10 @@ $ mxpy contract build "" --wasm-symbols Then run Mandos scenarios with: ```shell -$ python3 run-elrond-tests.py +$ python3 run_elrond_tests.py ``` -__Important__: `run-elrond-tests.py` makes use of Python modules implemented in the `wasm-semantics` submodule. For the time being, it requires setting the `PYTHONPATH` environment variable. +__Important__: `run_elrond_tests.py` makes use of Python modules implemented in the `wasm-semantics` submodule. For the time being, it requires setting the `PYTHONPATH` environment variable. ```shell $ export PYTHONPATH=$(pwd)/deps/wasm-semantics/binary-parser:$PYTHONPATH @@ -69,7 +69,7 @@ $ mxpy contract build "deps/mx-sdk-rs/contracts/examples/multisig" --wasm-symbol ... INFO:projects.core:Build ran. INFO:projects.core:WASM file generated: /path/to/multisig/output/multisig.wasm -$ python3 run-elrond-tests.py deps/mx-sdk-rs/contracts/examples/multisig/scenarios/changeBoard.scen.json +$ python3 run_elrond_tests.py deps/mx-sdk-rs/contracts/examples/multisig/scenarios/changeBoard.scen.json ``` ## Rule Coverage @@ -96,4 +96,130 @@ deps/wasm-semantics/elrond-config.md:324:10 ... ``` -The coverage files generated by `krun` are located under the build directory (`.build/defn/llvm/mandos-kompiled`). To clean up the coverage data generated, run `make clean-coverage`. \ No newline at end of file +The coverage files generated by `krun` are located under the build directory (`.build/defn/llvm/mandos-kompiled`). To clean up the coverage data generated, run `make clean-coverage`. + +## Writing Foundry-like Parametric Tests + +### Create a test contract + +To begin writing tests for your smart contract, you'll first need to create an empty contract using __mxpy__. + +```shell +mxpy contract new --template empty test_adder +``` + +Next, add [`testapi`](./src/testapi) as a dependency to your project. This package contains auxiliary external functions specifically designed for testing, implemented as WASM host functions. + +``` +$ cargo add +``` + +### Initializing the test contract + +The testing API provides the test contract with special abilities that regular contracts do not have, such as accessing the storage of other contracts and deploying contracts using local WASM file paths. + +We will use the `init` function to deploy the contract(s) involved in our test cases and create an initial state for running the test cases. This can be thought of as the equivalent of the `setState` and `scDeploy` steps in scenario tests. + +```rs +fn init(&self, code_path: ManagedBuffer) +``` + +The `init` function takes a path to the contract's wasm file as an argument and utilizes the `testapi::deploy_contract function` to deploy it. This function works similarly to the `scDeploy` step in the scenario format. + +```rs +let adder = testapi::deploy_contract( + &owner, // address of the owner account + 5000000000000, // some gas + &BigUint::zero(), // value + &code_path, // path to wasm file + &adder_init_args, +); +self.adder_address().set(&adder); +``` + +Once you've implemented the init function, it's essential to make sure the test runner knows the correct file path to use when deploying the test contract. To achieve this, you'll need to create a `foundry.json` file in the root directory of your test contract. In this file, specify the relative path to the contract's WASM file that you want to deploy for testing. + +For example, assuming your test contract is named `test_adder`, and you want to deploy the `adder.wasm` contract located in the ../../../deps/mx-sdk-rs/contracts/examples/adder/output/ directory, your `foundry.json` file should look like this: + +```json +{ + "contract_paths": [ + "../mx-sdk-rs/contracts/examples/adder/output/adder.wasm" + ] +} +``` + +By providing the correct file path in the `foundry.json` file, the test runner will be able to deploy the specified contract during the testing process. With the `init` function in place and the contract file path specified, you are now ready to write test cases in endpoints. + +### Writing test cases in endpoints + +In our testing approach, test cases are organized as endpoints, clearly labeled with the 'test_' prefix for easy identification. + +```rs +#[endpoint(test_call_add)] +fn test_call_add(&self, value: BigUint) +``` + +These endpoints can accept parameters, enabling us to express the contract's properties parametrically by varying these variables. This flexibility allows us to execute tests with fuzzing techniques or prove them using symbolic execution. + +Within each endpoint, we interact with the contract deployed during the `init` phase and employ the testing API to make specific assertions. These assertions serve as validation checks, ensuring that the contract behaves as intended and produces the expected outcomes during testing. + +In certain testing scenarios, it becomes necessary to simulate actions from another account. To achieve this, we employ a feature known as "pranks." + +Pranks enable the test contract to act as another account temporarily. We initiate a prank by using the `testapi::start_prank(&acct_addr)` function, where `acct_addr` represents the address of the account we wish to impersonate. Once the prank is started, any calls made by the test contract will be executed as if they were sent from the specified `acct_addr`. This allows us to test various functionalities from the perspective of that particular account. + +For instance, let's consider the following code snippet: + +```rs +testapi::start_prank(&owner); +let res = self.send_raw().direct_egld_execute( + &adder, + &BigUint::from(0u32), + 5000000, + &ManagedBuffer::from(b"add"), + &adder_init_args, +); +testapi::stop_prank(); +``` + +In this example, we initiate a prank using the `owner` account address. Subsequently, we execute a call to the contract `adder` as if it were invoked from the `owner` account. Once the intended actions are completed, we stop the prank using `testapi::stop_prank()`. + +After executing the call to the `adder` contract through a prank, it's common to observe changes in the contract's storage. To verify whether the expected changes have occurred, we can access the storage of the account using `testapi::get_storage`. In the following code snippet, we retrieve the value stored under the key "sum" in the storage of the `adder` contract: + +```rs +let sum_as_bytes = testapi::get_storage(&adder, &ManagedBuffer::from(b"sum")); +let sum = BigUint::from(sum_as_bytes); +``` + +Once we have obtained the stored value, we can then proceed to make assertions to verify its correctness. In this example, we are checking if the `sum` value is equal to the sum of the initial value (`INIT_SUM`) and the current `value`: + +```rs +testapi::assert(sum == (value + INIT_SUM)); +``` + +By combining pranks with storage access and assertions, we can comprehensively test the behavior of our Smart Contracts, ensuring their accuracy and robustness in various scenarios. + +### Running tests + +To run the tests for your Smart Contracts, ensure that you have fulfilled the following prerequisites: + +1. Compile the semantics by executing `make build-foundry`. +2. Compile the contract using `mxpy contract build `. +3. Install the `hypothesis` library by running `pip3 install hypothesis`. This library will be utilized for concrete execution with fuzzing. + +Now, follow these steps to run the test contract: + +Build the test contract by executing +```shell +mxpy contract build +``` + +Run the `run_foundry.py` script with the test contract's path as the argument: + +```shell +python3 run_foundry.py --directory +``` + +The `run_foundry.py` script will deploy the test contract using the arguments specified in the `foundry.json` file located in the test directory. It will extract the names and argument types of the test endpoints. Subsequently, the script will test these endpoints using random inputs generated with the `hypothesis` library, enabling fuzz testing. If it encounters an input that falsifies the assertions made in the test cases, it attempts to shrink the input and identify a minimal failing example. + +By following these steps, you can efficiently and comprehensively evaluate your Smart Contracts, ensuring their correctness and reliability in various scenarios and inputs. diff --git a/data/bytes-type.k b/data/bytes-type.k new file mode 100644 index 00000000..13f050ba --- /dev/null +++ b/data/bytes-type.k @@ -0,0 +1,11 @@ + +module BYTES-TYPE + import BYTES + + syntax WrappedBytes + syntax BYTES + + syntax WrappedBytes ::= wrap(Bytes) [symbol, klabel(wrapBytes)] + syntax Bytes ::= unwrap(WrappedBytes) [function, total, injective, symbol, klabel(unwrapBytes)] + rule unwrap(wrap(A:Bytes)) => A +endmodule diff --git a/data/list-bytes.k b/data/list-bytes.k index cb334570..eac64f7e 100644 --- a/data/list-bytes.k +++ b/data/list-bytes.k @@ -1,8 +1,11 @@ +requires "bytes-type.k" module LIST-BYTES imports private INT-SYNTAX imports private BASIC-K - + + imports BYTES-TYPE + syntax Bytes syntax ListBytes [hook(LIST.List)] @@ -16,23 +19,23 @@ module LIST-BYTES [ function, total, hook(LIST.unit), klabel(.ListBytes), symbol, smtlib(smt_seq_nil), latex(\dotCt{ListBytes}) ] - syntax ListBytes ::= ListItem(Bytes) + syntax ListBytes ::= ListItem(WrappedBytes) [ function, total, hook(LIST.element), klabel(ListBytesItem), symbol, smtlib(smt_seq_elem) ] - syntax Bytes ::= ListBytes "[" Int "]" + syntax WrappedBytes ::= ListBytes "[" Int "]" [ function, hook(LIST.get), klabel(ListBytes:get), symbol ] - syntax ListBytes ::= ListBytes "[" index: Int "<-" value: Bytes "]" + syntax ListBytes ::= ListBytes "[" index: Int "<-" value: WrappedBytes "]" [function, hook(LIST.update), klabel(ListBytes:set)] - syntax ListBytes ::= makeListBytes(length: Int, value: Bytes) + syntax ListBytes ::= makeListBytes(length: Int, value: WrappedBytes) [function, hook(LIST.make)] syntax ListBytes ::= updateList(dest: ListBytes, index: Int, src: ListBytes) [function, hook(LIST.updateAll)] - syntax ListBytes ::= fillList(ListBytes, index: Int, length: Int, value: Bytes) + syntax ListBytes ::= fillList(ListBytes, index: Int, length: Int, value: WrappedBytes) [function, hook(LIST.fill)] syntax ListBytes ::= range(ListBytes, fromFront: Int, fromBack: Int) [function, hook(LIST.range), klabel(ListBytes:range), symbol] - syntax Bool ::= Bytes "in" ListBytes + syntax Bool ::= WrappedBytes "in" ListBytes [function, total, hook(LIST.in), klabel(_inListBytes_)] syntax Int ::= size(ListBytes) [function, total, hook(LIST.size), klabel (sizeListBytes), smtlib(smt_seq_len)] @@ -42,24 +45,40 @@ module LIST-BYTES-EXTENSIONS imports BOOL imports INT imports LIST-BYTES + imports BYTES-TYPE - syntax Bytes ::= ListBytes "[" Int "]" "orDefault" Bytes + syntax WrappedBytes ::= ListBytes "[" Int "]" "orDefault" WrappedBytes [ function, total, klabel(ListBytes:getOrDefault), symbol ] - rule ListItem(V:Bytes) _:ListBytes [0] orDefault _:Bytes + syntax Bytes ::= ListBytes "{{" Int "}}" + [function, klabel(ListBytes:primitiveLookup)] +// ----------------------------------------------------------- + rule L:ListBytes {{ I:Int }} => unwrap( L[ I ] ) + + syntax Bytes ::= ListBytes "{{" Int "}}" "orDefault" Bytes + [ function, total, klabel(ListBytes:primitiveLookupOrDefault) ] +// ----------------------------------------------------------------------------- + rule L:ListBytes {{ I:Int }} orDefault Value:Bytes + => unwrap( L [I] orDefault wrap(Value) ) + + rule ListItem(V:WrappedBytes) _:ListBytes [0] orDefault _:WrappedBytes => V - rule _:ListBytes ListItem(V:Bytes) [-1] orDefault _:Bytes + rule _:ListBytes ListItem(V:WrappedBytes) [-1] orDefault _:WrappedBytes => V - rule .ListBytes [_:Int] orDefault D:Bytes => D + rule .ListBytes [_:Int] orDefault D:WrappedBytes => D - rule ListItem(_:Bytes) L:ListBytes [I:Int] orDefault D:Bytes + rule ListItem(_:WrappedBytes) L:ListBytes [I:Int] orDefault D:WrappedBytes => L[I -Int 1] orDefault D requires 0 L[I +Int 1] orDefault D requires I D + rule L:ListBytes[I:Int] orDefault D:WrappedBytes => D requires notBool (0 -Int size(L) <=Int I andBool I ListItem(wrap(B)) + endmodule diff --git a/data/map-bytes-to-bytes.k b/data/map-bytes-to-bytes.k index 268d2870..7a508965 100644 --- a/data/map-bytes-to-bytes.k +++ b/data/map-bytes-to-bytes.k @@ -1,16 +1,15 @@ -// require "bytes-type.k" +require "bytes-type.k" // require "bytes-type.k" module MAP-BYTES-TO-BYTES imports private BOOL-SYNTAX imports private INT-SYNTAX imports private LIST-BYTES - imports private LIST-BYTES // imports private LIST // imports private SET-BYTES imports private SET - // imports BYTES-TYPE + imports BYTES-TYPE // imports BYTES-TYPE syntax Bytes @@ -26,7 +25,7 @@ module MAP-BYTES-TO-BYTES [ function, total, hook(MAP.unit), klabel(.MapBytesToBytes), symbol, latex(\dotCt{MapBytesToBytes}) ] - syntax MapBytesToBytes ::= Bytes "Bytes2Bytes|->" Bytes + syntax MapBytesToBytes ::= WrappedBytes "Bytes2Bytes|->" WrappedBytes [ function, total, hook(MAP.element), klabel(_Bytes2Bytes|->_), symbol, latex({#1}\mapsto{#2}), injective @@ -34,17 +33,17 @@ module MAP-BYTES-TO-BYTES syntax priorities _Bytes2Bytes|->_ > _MapBytesToBytes_ .MapBytesToBytes syntax non-assoc _Bytes2Bytes|->_ - syntax Bytes ::= MapBytesToBytes "[" Bytes "]" + syntax WrappedBytes ::= MapBytesToBytes "[" WrappedBytes "]" [function, hook(MAP.lookup), klabel(MapBytesToBytes:lookup), symbol] - syntax Bytes ::= MapBytesToBytes "[" Bytes "]" "orDefault" Bytes + syntax WrappedBytes ::= MapBytesToBytes "[" WrappedBytes "]" "orDefault" WrappedBytes [ function, total, hook(MAP.lookupOrDefault), klabel(MapBytesToBytes:lookupOrDefault), symbol ] - syntax MapBytesToBytes ::= MapBytesToBytes "[" key: Bytes "<-" value: Bytes "]" + syntax MapBytesToBytes ::= MapBytesToBytes "[" key: WrappedBytes "<-" value: WrappedBytes "]" [ function, total, klabel(MapBytesToBytes:update), symbol, hook(MAP.update), prefer ] - syntax MapBytesToBytes ::= MapBytesToBytes "[" Bytes "<-" "undef" "]" + syntax MapBytesToBytes ::= MapBytesToBytes "[" WrappedBytes "<-" "undef" "]" [ function, total, hook(MAP.remove), klabel(_MapBytesToBytes[_<-undef]), symbol ] @@ -70,7 +69,7 @@ module MAP-BYTES-TO-BYTES syntax ListBytes ::= "keys_list" "(" MapBytesToBytes ")" [function, hook(MAP.keys_list)] - syntax Bool ::= Bytes "in_keys" "(" MapBytesToBytes ")" + syntax Bool ::= WrappedBytes "in_keys" "(" MapBytesToBytes ")" [function, total, hook(MAP.in_keys)] // syntax List ::= values(MapBytesToBytes) @@ -82,7 +81,7 @@ module MAP-BYTES-TO-BYTES [function, total, hook(MAP.size), klabel(MapBytesToBytes.sizeMap), symbol] syntax Bool ::= MapBytesToBytes "<=Map" MapBytesToBytes [function, total, hook(MAP.inclusion)] - syntax Bytes ::= choice(MapBytesToBytes) + syntax WrappedBytes ::= choice(MapBytesToBytes) [function, hook(MAP.choice), klabel(MapBytesToBytes:choice), symbol] endmodule @@ -110,14 +109,14 @@ module MAP-BYTES-TO-BYTES-PRIMITIVE-CONCRETE [concrete] [function, total, klabel(MapBytesToBytes:primitiveInKeys), symbol] rule (M:MapBytesToBytes {{ Key:Bytes }}) - => (M[Key]) + => unwrap( M[ wrap(Key) ] ) rule M:MapBytesToBytes {{ Key:Bytes }} orDefault Value:Bytes - => M[Key] orDefault Value + => unwrap( M[wrap(Key)] orDefault wrap(Value) ) rule M:MapBytesToBytes {{ Key:Bytes <- Value:Bytes }} - => M[Key <- Value] + => M[wrap(Key) <- wrap(Value)] rule M:MapBytesToBytes {{ Key:Bytes <- undef }} - => M[Key <- undef] - rule Key:Bytes in_keys {{ M:MapBytesToBytes }} => Key in_keys(M) + => M[wrap(Key) <- undef] + rule Key:Bytes in_keys {{ M:MapBytesToBytes }} => wrap(Key) in_keys(M) endmodule module MAP-BYTES-TO-BYTES-PRIMITIVE-SYMBOLIC [symbolic] @@ -188,57 +187,57 @@ module MAP-BYTES-TO-BYTES-PRIMITIVE-SYMBOLIC [symbolic] [simplification] // Translation rules - rule M:MapBytesToBytes[Key:Bytes] + rule M:MapBytesToBytes[ wrap(Key) ] => M{{Key}} [simplification, symbolic(M)] - rule M:MapBytesToBytes[Key:Bytes] + rule M:MapBytesToBytes[ wrap(Key) ] => M{{Key}} [simplification, symbolic(Key)] rule M:MapBytesToBytes{{Key}} - => M[Key] + => M[wrap(Key)] [simplification, concrete] - rule M:MapBytesToBytes [ Key:Bytes ] orDefault Value:Bytes + rule M:MapBytesToBytes [ wrap(Key) ] orDefault wrap(Value) => M {{ Key }} orDefault Value [simplification, symbolic(M)] - rule M:MapBytesToBytes [ Key:Bytes ] orDefault Value:Bytes + rule M:MapBytesToBytes [ wrap(Key) ] orDefault wrap(Value) => M {{ Key }} orDefault Value [simplification, symbolic(Key)] - rule M:MapBytesToBytes [ Key:Bytes ] orDefault Value:Bytes + rule M:MapBytesToBytes [ wrap(Key) ] orDefault wrap(Value) => M {{ Key }} orDefault Value [simplification, symbolic(Value)] rule M:MapBytesToBytes{{Key}} orDefault Value - => M[Key] orDefault Value + => M[wrap(Key)] orDefault Value [simplification, concrete] - rule M:MapBytesToBytes[Key:Bytes <- Value:Bytes] + rule M:MapBytesToBytes[wrap(Key) <- wrap(Value)] => M {{ Key <- Value }} [simplification, symbolic(M)] - rule M:MapBytesToBytes[Key:Bytes <- Value:Bytes] + rule M:MapBytesToBytes[wrap(Key) <- wrap(Value)] => M {{ Key <- Value }} [simplification, symbolic(Key)] - rule M:MapBytesToBytes[Key:Bytes <- Value:Bytes] + rule M:MapBytesToBytes[wrap(Key) <- wrap(Value)] => M {{ Key <- Value }} [simplification, symbolic(Value)] - rule M:MapBytesToBytes{{Key <- Value}} => M[Key <- Value ] + rule M:MapBytesToBytes{{Key <- Value}} => M[wrap(Key) <- wrap(Value) ] [simplification, concrete] - rule M:MapBytesToBytes[Key:Bytes <- undef] + rule M:MapBytesToBytes[wrap(Key) <- undef] => M {{ Key <- undef }} [simplification, symbolic(M)] - rule M:MapBytesToBytes[Key:Bytes <- undef] + rule M:MapBytesToBytes[wrap(Key) <- undef] => M {{ Key <- undef }} [simplification, symbolic(Key)] - rule M:MapBytesToBytes{{Key <- undef}} => M[Key <- undef] + rule M:MapBytesToBytes{{Key <- undef}} => M[wrap(Key) <- undef] [simplification, concrete] - rule Key:Bytes in_keys (M:MapBytesToBytes) + rule wrap(Key) in_keys (M:MapBytesToBytes) => Key in_keys {{M}} [simplification, symbolic(M)] - rule Key:Bytes in_keys (M:MapBytesToBytes) + rule wrap(Key) in_keys (M:MapBytesToBytes) => Key in_keys {{M}} [simplification, symbolic(Key)] - rule Key in_keys {{M:MapBytesToBytes}} => Key in_keys(M) + rule Key in_keys {{M:MapBytesToBytes}} => wrap(Key) in_keys(M) [simplification, concrete] // Symbolic execution rules @@ -317,9 +316,9 @@ module MAP-BYTES-TO-BYTES-KORE-SYMBOLIC imports private BOOL syntax Bool ::= definedMapElementConcat(Bytes, Bytes, MapBytesToBytes) [function, total] - rule definedMapElementConcat(K, _V, M:MapBytesToBytes) => notBool K in_keys(M) + rule definedMapElementConcat(K, _V, M:MapBytesToBytes) => notBool wrap(K) in_keys(M) - rule #Ceil(@M:MapBytesToBytes [@K:Bytes]) + rule #Ceil(@M:MapBytesToBytes [@K:WrappedBytes]) => {(@K in_keys(@M)) #Equals true} #And #Ceil(@M) #And #Ceil(@K) [simplification] @@ -380,18 +379,18 @@ module MAP-BYTES-TO-BYTES-KORE-SYMBOLIC requires K1 =/=K K2 [simplification] - rule K in_keys((K Bytes2Bytes|-> V) M:MapBytesToBytes) + rule wrap(K) in_keys((wrap(K) Bytes2Bytes|-> wrap(V)) M:MapBytesToBytes) => true requires definedMapElementConcat(K, V, M) [simplification(50)] - rule K1 in_keys((K2 Bytes2Bytes|-> V) M:MapBytesToBytes) - => K1 in_keys(M) + rule wrap(K1) in_keys((wrap(K2) Bytes2Bytes|-> wrap(V)) M:MapBytesToBytes) + => wrap(K1) in_keys(M) requires true andBool definedMapElementConcat(K2, V, M) andBool K1 =/=K K2 [simplification(50)] - rule K1 in_keys((K2 Bytes2Bytes|-> V) M:MapBytesToBytes) - => K1 ==K K2 orBool K1 in_keys(M) + rule wrap(K1) in_keys((wrap(K2) Bytes2Bytes|-> wrap(V)) M:MapBytesToBytes) + => wrap(K1) ==K wrap(K2) orBool wrap(K1) in_keys(M) requires definedMapElementConcat(K2, V, M) [simplification(100)] diff --git a/elrond-config.md b/elrond-config.md index 03ee874b..a3a3ad28 100644 --- a/elrond-config.md +++ b/elrond-config.md @@ -310,10 +310,10 @@ TODO: Implement [reserved keys and read-only runtimes](https://github.com/Elrond // ----------------------------------------------- rule #appendToOutFromBytesStack => . ... OUT : STACK => STACK - ... (.ListBytes => ListItem(OUT)) + ... (.ListBytes => ListItem(wrap(OUT))) rule #appendToOut(OUT) => . ... - ... (.ListBytes => ListItem(OUT)) + ... (.ListBytes => ListItem(wrap(OUT))) ``` ### Parsing @@ -395,7 +395,7 @@ TODO: Implement [reserved keys and read-only runtimes](https://github.com/Elrond ... (.List => ListItem(logEntry(CALLEE, IDENTIFIER, TOPICS, DATA))) rule #writeLogAux(NUMTOPICS, TOPICS, DATA) - => #writeLogAux(NUMTOPICS -Int 1, ListItem(TOPIC) TOPICS, DATA) + => #writeLogAux(NUMTOPICS -Int 1, ListItem(wrap(TOPIC)) TOPICS, DATA) ... TOPIC : STACK => STACK @@ -414,7 +414,7 @@ TODO: Implement [reserved keys and read-only runtimes](https://github.com/Elrond . OUT LOGS - .VMOutput => VMOutput( OK , .Bytes , OUT , LOGS) + _ => VMOutput( OK , .Bytes , OUT , LOGS) [priority(60)] syntax InternalCmd ::= "#waitWasm" diff --git a/foundry.md b/foundry.md new file mode 100644 index 00000000..ea64b9b2 --- /dev/null +++ b/foundry.md @@ -0,0 +1,327 @@ +# Foundry for Elrond + +```k +require "mandos.md" + +module FOUNDRY-SYNTAX + imports FOUNDRY +endmodule + +module FOUNDRY + imports MANDOS +``` + +## Configuration + +```k + configuration + + + .Map // file path -> wasm module AST + false + + + syntax Bytes ::= "#foundryRunner" [macro] + // -------------------------------------------------------- + rule #foundryRunner + => b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00k-test________________" +``` + +## Foundry Host Functions + +Only the `#foundryRunner` account can execute these commands/host functions. + +### Create account + +```k + rule [hostCall-createAccount]: + hostCall ( "env" , "createAccount" , [ i32 i64 i32 .ValTypes ] -> [ .ValTypes ] ) + => foundryCreateAccount( getBuffer(ADDR_HANDLE), NONCE, getBigInt(BALANCE_HANDLE)) + ... + + + 0 |-> ADDR_HANDLE + 1 |-> NONCE + 2 |-> BALANCE_HANDLE + + #foundryRunner + + syntax InternalInstr ::= foundryCreateAccount(BytesResult, Int, IntResult) + // ---------------------------------------------------------------------------- + rule [instr-createAccount]: + foundryCreateAccount(ADDR:Bytes, NONCE, BALANCE:Int) + => #waitCommands + ... + + (. => createAccount(ADDR) + ~> setAccountFields(ADDR, NONCE, BALANCE, .Code, .Bytes, .MapBytesToBytes ) + ) ... + + + rule [instr-createAccount-err]: + foundryCreateAccount(_, _, _) + => #throwException(ExecutionFailed, "Could not create account") + ... + + [owise] + +``` + +### Register new address + +```k + rule [hostCall-registerNewAddress]: + hostCall ( "env" , "registerNewAddress" , [ i32 i64 i32 .ValTypes ] -> [ .ValTypes ] ) + => foundryRegisterNewAddress( getBuffer(OWNER_HANDLE), NONCE, getBuffer(ADDR_HANDLE)) + ... + + + 0 |-> OWNER_HANDLE + 1 |-> NONCE + 2 |-> ADDR_HANDLE + + #foundryRunner + + syntax InternalInstr ::= foundryRegisterNewAddress(BytesResult, Int, BytesResult) + // ---------------------------------------------------------------------------- + rule [instr-registerNewAddress]: + foundryRegisterNewAddress(CREATOR:Bytes, NONCE, NEW:Bytes) + => . ... + + NEWADDRESSES => NEWADDRESSES [tuple(CREATOR, NONCE) <- NEW] + + rule [instr-registerNewAddress-err]: + foundryRegisterNewAddress(_, _, _) + => #throwException(ExecutionFailed, "Could not register address") ... + + [owise] + +``` + +### Deploy contract + +```k + rule [hostCall-deployContract]: + hostCall("env", "deployContract", [i32 i64 i32 i32 i32 i32 .ValTypes] -> [.ValTypes]) + => foundryDeployContract( + getBuffer(OWNER_HANDLE), + GAS_LIMIT, + getBigInt(VALUE_HANDLE), + getBuffer(CODE_PATH_HANDLE), + readManagedVecOfManagedBuffers(ARGS_HANDLE), + RESULT_ADDR_HANDLE + ) + ... + + + 0 |-> OWNER_HANDLE + 1 |-> GAS_LIMIT + 2 |-> VALUE_HANDLE + 3 |-> CODE_PATH_HANDLE + 4 |-> ARGS_HANDLE + 5 |-> RESULT_ADDR_HANDLE + + #foundryRunner + + syntax InternalInstr ::= foundryDeployContract(BytesResult, Int, IntResult, BytesResult, ListBytesResult, Int) + // ---------------------------------------------------------------------------- + rule [instr-deployContract]: + foundryDeployContract(OWNER:Bytes, GAS, VALUE:Int, PATH:Bytes, ARGS:ListBytes, RESULT_ADDR_HANDLE) + => #waitCommands + ~> #setBuffer(RESULT_ADDR_HANDLE, NEWADDR) + ... + + (. + => createAccount(NEWADDR) + ~> setAccountOwner(NEWADDR, OWNER) + ~> setAccountCode(NEWADDR, MODULE) + ~> callContract(NEWADDR, "init", mkVmInputDeploy(OWNER, VALUE, ARGS, GAS, 0)) + ) ... + + +
OWNER
+ NONCE + ... +
+ ... tuple(OWNER, NONCE) |-> NEWADDR:Bytes ... + ... PATH |-> MODULE + + rule [instr-deployContract-err]: + foundryDeployContract(_, _, _, _, _, _) + => #throwException(ExecutionFailed, "Could not deploy contract") + ... + + [owise] + +``` + +### Get/set storage + +```k + rule [hostCall-getStorage]: + hostCall ( "env" , "getStorage" , [ i32 i32 i32 .ValTypes ] -> [ .ValTypes ] ) + => foundryGetStorage( getBuffer(OWNER_HANDLE), getBuffer(KEY_HANDLE), DEST_HANDLE) + ... + + + 0 |-> OWNER_HANDLE + 1 |-> KEY_HANDLE + 2 |-> DEST_HANDLE + + #foundryRunner + + syntax InternalInstr ::= foundryGetStorage(BytesResult, BytesResult, Int) + // ------------------------------------------------------------------------- + rule [testapi-getStorage]: + foundryGetStorage(OWNER:Bytes, KEY:Bytes, DEST_HANDLE) + => #setBuffer(DEST_HANDLE, VAL) + ... + + +
OWNER
+ ... wrap(KEY) Bytes2Bytes|-> wrap(VAL) ... + ... +
+ + rule [testapi-getStorage-err]: + foundryGetStorage(_, _, DEST_HANDLE) + => #setBuffer(DEST_HANDLE, .Bytes) + ... + + [owise] + +``` + +### Assertions and assumptions + +```k + rule [hostCall-assertBool]: + hostCall ( "env" , "assertBool" , [ i32 .ValTypes ] -> [ .ValTypes ] ) + => #assert( P ) ... + + + 0 |-> P + + + syntax InternalInstr ::= #assert(Int) [symbol, klabel(foundryAssert)] + // ------------------------------------------------------------------------- + rule [foundryAssert-true]: + #assert( I ) => . ... + requires I =/=Int 0 + + rule [foundryAssert-false]: + #assert( I ) + => #throwException(ExecutionFailed, "assertion failed") ... + + requires I ==Int 0 + + + rule [hostCall-assumeBool]: + hostCall ( "env" , "assumeBool" , [ i32 .ValTypes ] -> [ .ValTypes ] ) + => #assume(P) ... + + + 0 |-> P + + + syntax IternalInstr ::= #assume(Int) [symbol, klabel(foundryAssume)] + // ------------------------------------------------------------------------ + rule [foundryAssume-true]: + #assume(P) => . ... + requires P =/=Int 0 + + rule [foundryAssume-false]: + #assume(P) => #endFoundryImmediately ... + requires P ==Int 0 + + syntax IternalInstr ::= "#endFoundryImmediately" + [symbol, klabel(endFoundryImmediately)] + // ------------------------------------------------------ + rule [endFoundryImmediately]: + ( + #endFoundryImmediately ... + ... + + => + + . + ... + ) + _ => .List + _ => .List + _ => . + _ => . + _ => .Set + _ => false + _ => 0 + +``` + +### Prank + +```k + rule [hostCall-startPrank]: + hostCall ( "env" , "startPrank" , [ i32 .ValTypes ] -> [ .ValTypes ] ) + => #startPrank(getBuffer(ADDR_HANDLE)) ... + + + 0 |-> ADDR_HANDLE + + #foundryRunner + + syntax InternalInstr ::= #startPrank(BytesResult) + // ------------------------------------------------- + rule [startPrank]: + #startPrank(ADDR:Bytes) => . ... + #foundryRunner => ADDR + false => true + + rule [startPrank-not-allowed]: + #startPrank(_:Bytes) + => #throwException(ExecutionFailed, "Only the test contract can start a prank and the test contract can't start a prank while already pranking") + ... + + ADDR + PRANK + requires ADDR =/=K #foundryRunner + orBool PRANK + + rule [startPrank-err]: + #startPrank(Err(MSG)) + => #throwException(ExecutionFailed, MSG) + ... + + + rule [hostCall-stopPrank]: + hostCall ( "env" , "stopPrank" , [ .ValTypes ] -> [ .ValTypes ] ) + => . ... + + .Map + _ => #foundryRunner + true => false + + rule [hostCall-stopPrank-err]: + hostCall ( "env" , "stopPrank" , [ .ValTypes ] -> [ .ValTypes ] ) + => #throwException(ExecutionFailed, "Cannot stop prank while not in a prank") ... + + .Map + false + [owise] + +``` + +## Misc + + ```k + syntax InternalInstr ::= "#waitCommands" + // --------------------------------------- + rule [waitCommands]: + #waitCommands => . ... + #endWasm ... + [priority(200)] + + rule #transferSuccess => . ... + #waitCommands ... + +endmodule +``` \ No newline at end of file diff --git a/mandos.md b/mandos.md index 26b8f3ae..4faed42c 100644 --- a/mandos.md +++ b/mandos.md @@ -2,7 +2,7 @@ Mandos Testing Framework ======================== ```k -require "wasm-text.md" +require "wasm-semantics/wasm-text.md" require "elrond.md" module MANDOS-SYNTAX @@ -55,8 +55,8 @@ Only take the next step once both the Elrond node and Wasm are done executing. . [priority(60)] - syntax Step ::= "setExitCode" Int - // --------------------------------- + syntax Step ::= "setExitCode" Int [klabel(setExitCode), symbol] + // ------------------------------------------------------------------- rule setExitCode I => . ... . . @@ -91,12 +91,12 @@ Only take the next step once both the Elrond node and Wasm are done executing. rule #removeEmptyBytes(.MapBytesToBytes) => .MapBytesToBytes rule #removeEmptyBytes(Key Bytes2Bytes|-> Value M) - => #if Value ==K .Bytes + => #if Value ==K wrap(.Bytes) #then #removeEmptyBytes(M) #else Key Bytes2Bytes|-> Value #removeEmptyBytes(M) #fi rule #removeEmptyBytes(Key Bytes2Bytes|-> Value M) - => #if Value ==K .Bytes + => #if Value ==K wrap(.Bytes) #then #removeEmptyBytes(M) #else Key Bytes2Bytes|-> Value #removeEmptyBytes(M) #fi diff --git a/run-elrond-tests.py b/run_elrond_tests.py similarity index 95% rename from run-elrond-tests.py rename to run_elrond_tests.py index 1b3dcd11..9a233a88 100755 --- a/run-elrond-tests.py +++ b/run_elrond_tests.py @@ -19,6 +19,10 @@ def flatten(l): return [item for sublist in l for item in sublist] +def wrapBytes(bs: KInner): + assert bs.sort == KSort('Bytes') + return KApply('wrapBytes', [bs]) + def KWasmString(value): return KToken('"%s"' % value, 'WasmStringToken') @@ -61,7 +65,6 @@ def config_to_kast_term(config): WASM_definition_main_file = 'mandos' WASM_definition_llvm_dir = Path('.build/defn/llvm') WASM_definition_llvm_kompiled_dir = WASM_definition_llvm_dir / (WASM_definition_main_file + '-kompiled') -KRunner = KRun(WASM_definition_llvm_kompiled_dir) addr_prefix = "address:" sc_prefix = "sc:" @@ -254,7 +257,8 @@ def mandos_argument_to_kbytes(argument: str): def mandos_arguments_to_klist(arguments: list): tokenized = list(map(lambda x: mandos_argument_to_kbytes(x), arguments)) - return ListBytes(tokenized) + wrapped = list(map(wrapBytes, tokenized)) + return ListBytes(wrapped) def mandos_to_set_account(address, sections, filename, output_dir): """Creates a K account cell from a Mandos account description. """ @@ -269,6 +273,7 @@ def mandos_to_set_account(address, sections, filename, output_dir): code_value = file_to_module_decl(code_path, output_dir) storage_pairs = [ (mandos_argument_to_kbytes(k), mandos_argument_to_kbytes(v)) for (k, v) in sections.get('storage', {}).items() ] + storage_pairs = [ (wrapBytes(k), wrapBytes(v)) for (k, v) in storage_pairs ] storage_value = KMapBytesToBytes(storage_pairs) set_account_steps = [KApply('setAccount', [address_value, nonce_value, balance_value, code_value, owner_value, storage_value])] @@ -305,6 +310,7 @@ def mandos_to_check_account(address, sections, filename): k_bytes = mandos_argument_to_kbytes(k) v_bytes = mandos_argument_to_kbytes(v) storage_pairs.append((k_bytes, v_bytes)) + storage_pairs = [ (wrapBytes(k), wrapBytes(v)) for (k, v) in storage_pairs ] storage_value = KMapBytesToBytes(storage_pairs) k_steps.append(KApply('checkAccountStorage', [address_value, storage_value])) if ('code' in sections) and (sections['code'] != '*'): @@ -605,7 +611,7 @@ def get_steps_as_kseq(filename, output_dir): raise Exception('Step %s not implemented yet' % step['step']) return k_steps -def run_test_file(template_wasm_config, test_file_path, output_dir, cmd_args): +def run_test_file(krun: KRun, template_wasm_config, test_file_path, output_dir, cmd_args): global args test_name = os.path.basename(test_file_path) k_steps = get_steps_as_kseq(test_file_path, output_dir) @@ -627,13 +633,13 @@ def run_test_file(template_wasm_config, test_file_path, output_dir, cmd_args): # Run: generate a new JSON as a temporary file, then read that as the new wasm state. if cmd_args.log_level != 'none': - log_intermediate_state("%s_%d_%s.pre" % (test_name, i, step_name), init_config, output_dir) + log_intermediate_state(krun, "%s_%d_%s.pre" % (test_name, i, step_name), init_config, output_dir) - new_config = krun_config(init_config=init_config) + new_config = krun_config(krun, init_config=init_config) final_config = new_config if cmd_args.log_level != 'none': - log_intermediate_state("%s_%d_%s" % (test_name, i, step_name), final_config, output_dir) + log_intermediate_state(krun, "%s_%d_%s" % (test_name, i, step_name), final_config, output_dir) # Check if the k cell is empty symbolic_config, init_subst = split_config_from(new_config) @@ -644,18 +650,18 @@ def run_test_file(template_wasm_config, test_file_path, output_dir, cmd_args): return final_config -def krun_config(init_config: KInner) -> KInner: - kore_config = KRunner.kast_to_kore(init_config, sort=KSort('GeneratedTopCell')) - kore_config = KRunner.run_kore_term(kore_config) - return KRunner.kore_to_kast(kore_config) +def krun_config(krun: KRun, init_config: KInner) -> KInner: + kore_config = krun.kast_to_kore(init_config, sort=KSort('GeneratedTopCell')) + kore_config = krun.run_kore_term(kore_config) + return krun.kore_to_kast(kore_config) # ... Setup Elrond Wasm -def log_intermediate_state(name, config, output_dir): +def log_intermediate_state(krun: KRun, name, config, output_dir): with open('%s/%s' % (output_dir, name), 'w') as f: f.write(json.dumps(config_to_kast_term(config))) with open('%s/%s.pretty.k' % (output_dir, name), 'w') as f: - pretty = KRunner.pretty_print(config) + pretty = krun.pretty_print(config) f.write(pretty) # Main Script @@ -670,6 +676,8 @@ def run_tests(): args = testArgs.parse_args() tests = args.files + krun = KRun(WASM_definition_llvm_kompiled_dir) + with open('src/elrond-runtime.loaded.json', 'r') as f: runtime_json = json.load(f) template_wasm_config = KInner.from_dict(runtime_json['term']) @@ -688,7 +696,7 @@ def run_tests(): with open('%s/%s' % (tmpdir, initial_name), 'w') as f: f.write(json.dumps(config_to_kast_term(template_wasm_config))) - run_test_file(template_wasm_config, test, tmpdir, args) + run_test_file(krun, template_wasm_config, test, tmpdir, args) if args.verbose: print('See %s' % tmpdir) diff --git a/run_foundry.py b/run_foundry.py new file mode 100644 index 00000000..561b8409 --- /dev/null +++ b/run_foundry.py @@ -0,0 +1,493 @@ +import argparse +import glob +from os.path import join +from typing import Iterable, Mapping + +from hypothesis import given, settings, Verbosity +from hypothesis.strategies import SearchStrategy, integers, tuples +from pyk.prelude.utils import token +from pyk.prelude.collections import list_of, map_of +from pyk.kast.inner import KSort, KVariable +from pyk.cterm import CTerm, build_claim, KClaim +from pyk.utils import ensure_dir_path +from pyk.prelude.kint import leInt +from pyk.prelude.ml import mlEqualsTrue + +from run_elrond_tests import * + +INPUT_FILE_NAME = 'foundry.json' +TEST_PREFIX = 'test_' + +ROOT_ACCT_ADDR = 'address:k' +TEST_SC_ADDR = 'sc:k-test' + +REC_LIMIT = 4000 +sys.setrecursionlimit(REC_LIMIT) + +def load_input_json(test_dir: str) -> dict: + try: + with open(join(test_dir, INPUT_FILE_NAME), 'r') as f: + return json.load(f) + except FileNotFoundError as e: + raise FileNotFoundError('"{INPUT_FILE_NAME}" not found in "{test_dir}"') + + +def load_wasm(filename: str) -> KInner: + with open(filename, 'rb') as f: + return wasm2kast.wasm2kast(f, filename) + + +def find_test_wasm_path(test_dir: str) -> str: + test_wasm_path = glob.glob(test_dir + '/output/*.wasm') + # TODO this loads the first wasm file in the directory. what if there are multiple wasm files? + if test_wasm_path: + return test_wasm_path[0] + else: + raise ValueError(f'WASM file not found: {test_dir}/output/?.wasm') + + +def load_contract_wasms(contract_wasm_paths: Iterable[str]) -> dict[bytes, KInner]: + contract_wasm_modules = { + bytes(f, 'ascii'): load_wasm(f) for f in contract_wasm_paths + } + + return contract_wasm_modules + + +def set_exit_code(i: int) -> KInner: + return KApply('setExitCode', [KInt(i)]) + + +def deploy_test( + krun: KRun, test_wasm: KInner, contract_wasms: dict[bytes, KInner] +) -> tuple[KInner, dict[str, KInner]]: + """ + 1. create a main account: 'k' + 2. reserve a new address for the test contract: owner = 'k', contract address = 'k-test' + 3. deploy the test contract from account 'k': 'k-test' + """ + # create the root account + k_addr = mandos_argument_to_kbytes(ROOT_ACCT_ADDR) + init_main_acct = KApply( + 'setAccount', + [ + k_addr, + token(1), + token(100000), + KApply('.Code', []), + token(b''), + KMapBytesToBytes([]), + ], + ) + + # the test contract's address will be 'k-test' + k_test_addr = mandos_argument_to_kbytes(TEST_SC_ADDR) + new_address = KApply('newAddress', [k_addr, token(1), k_test_addr]) + + # deploy the test contract + arguments = ListBytes(wrapBytes(token(k)) for k in contract_wasms) + gas = token(5000000000000) + deploy_cmd = KApply( + 'deployTx', [k_addr, token(0), test_wasm, arguments, gas, token(0)] + ) + + # initialization steps + init_steps = KSequence( + [set_exit_code(1), init_main_acct, new_address, deploy_cmd, set_exit_code(0)] + ) + + # create an empty config and embed init steps + empty_conf = krun.definition.init_config(KSort('GeneratedTopCell')) + + conf, subst = split_config_from(empty_conf) + subst['K_CELL'] = init_steps + subst['WASMSTORE_CELL'] = map_of( + {token(path): mod for path, mod in contract_wasms.items()} + ) + conf_with_steps = Subst(subst)(conf) + + _, sym_conf, subst = run_config_and_check_empty(krun, conf_with_steps) + + subst['WASMSTORE_CELL'] = map_of({}) + + return sym_conf, subst + + +def run_config(krun: KRun, conf: KInner) -> KInner: + conf_kore = krun.kast_to_kore(conf, sort=KSort('GeneratedTopCell')) + res_conf_kore = krun.run_kore_term(conf_kore, expect_rc=0) + return krun.kore_to_kast(res_conf_kore) + + +def run_config_and_check_empty( + krun: KRun, conf: KInner +) -> tuple[KInner, KInner, dict[str, KInner]]: + + final_conf = run_config(krun, conf) + sym_conf, subst = split_config_from(final_conf) + k_cell = subst['K_CELL'] + if not isinstance(k_cell, KSequence) or k_cell.arity != 0: + print(krun.pretty_print(subst['VMOUTPUT_CELL']), file=sys.stderr) + print(krun.pretty_print(subst['K_CELL']), file=sys.stderr) + raise ValueError(f'k cell not empty:\n { krun.pretty_print(final_conf) }') + + return final_conf, sym_conf, subst + + +def run_test( + krun: KRun, sym_conf: KInner, init_subst: dict[str, KInner], endpoint: str, args: tuple[str, ...] +): + step = { + 'tx': { + 'from': ROOT_ACCT_ADDR, + 'to': TEST_SC_ADDR, + 'function': endpoint, + 'value': '0', + 'arguments': args, + 'gasLimit': '5,000,000,000', + 'gasPrice': '0', + }, + 'expect': {'status': '0'}, + } + tx_steps = KSequence( + [set_exit_code(1)] + get_steps_sc_call(step) + [set_exit_code(0)] + ) + + subst = init_subst.copy() + subst['K_CELL'] = tx_steps + conf_with_steps = Subst(subst)(sym_conf) + + try: + run_config(krun, conf_with_steps) + except RuntimeError as rte: + if rte.args[0].startswith('Command krun exited with code 1'): + raise RuntimeError(f'Test failed for input input: {args}') from None + raise rte + +# Test metadata + + +def get_test_endpoints(test_dir: str) -> Mapping[str, tuple[str, ...]]: + abi_paths = glob.glob(test_dir + '/output/*.abi.json') + # TODO this loads the first wasm file in the directory. what if there are multiple wasm files? + if abi_paths: + abi_path = abi_paths[0] + else: + raise ValueError(f'ABI file not found: {test_dir}/output/?.abi.json') + + with open(abi_path, 'r') as f: + abi_json = json.load(f) + + endpoints = {} + for endpoint in abi_json['endpoints']: + name = endpoint['name'] + if not name.startswith(TEST_PREFIX): + continue + + inputs = tuple(i['type'] for i in endpoint['inputs']) + + endpoints[name] = inputs + + return endpoints + + +# Hypothesis strategies + + +def type_to_strategy(typ: str) -> SearchStrategy[str]: + if typ == 'BigUint': + return integers(min_value=0).map(str) + if typ == 'u32': + return integers(min_value=0, max_value=4294967295).map(str) + raise TypeError(f'Cannot create random {typ}') + + +def arg_types_to_strategy(types: Iterable[str]) -> SearchStrategy[tuple[str, ...]]: + strs = (type_to_strategy(t) for t in types) + return tuples(*strs) + + +# Hypothesis test runner + + +def test_with_hypothesis( + krun: KRun, + sym_conf: KInner, + init_subst: dict[str, KInner], + endpoint: str, + arg_types: Iterable[str] +) -> None: + + def test(args: tuple[str,...]): + # set the recursion limit every time because hypothesis changes it + if sys.getrecursionlimit() < REC_LIMIT: + sys.setrecursionlimit(REC_LIMIT) + + run_test(krun, sym_conf, init_subst, endpoint, args) + + test.__name__ = endpoint # show endpoint name in hypothesis logs + + args_strategy = arg_types_to_strategy(arg_types) + given(args_strategy)( + settings( + deadline=50000, # set time limit for individual runs + max_examples=10, # enough for demo + verbosity=Verbosity.verbose, + )(test) + )() + + +def run_concrete( + krun: KRun, + test_endpoints: Mapping[str, tuple[str, ...]], + sym_conf: KInner, + init_subst: dict[str, KInner], +) -> None: + + for endpoint, arg_types in test_endpoints.items(): + print(f'Testing "{endpoint}"') + test_with_hypothesis(krun, sym_conf, init_subst, endpoint, arg_types) + + +# Claim generation + + +def generate_claims( + krun: KRun, + test_endpoints: Mapping[str, tuple[str, ...]], + sym_conf: KInner, + init_subst: dict[str, KInner], + output_dir: Path, +) -> None: + output_dir = ensure_dir_path(output_dir) + + for endpoint, arg_types in test_endpoints.items(): + claim = generate_claim(endpoint, arg_types, sym_conf, init_subst) + + output_file = output_dir / f'{endpoint}-spec.k' + + txt = krun.pretty_print(claim) # TODO wrap this in a spec module with imports + + with open(output_file, 'w') as f: + f.write(txt) + + +def generate_claim( + func: str, + arg_types: tuple[str, ...], + sym_conf: KInner, + init_subst: dict[str, KInner], +) -> KClaim: + + root_acc = mandos_argument_to_kbytes(ROOT_ACCT_ADDR) + test_sc = mandos_argument_to_kbytes(TEST_SC_ADDR) + vars, ctrs = make_vars_and_constraints(arg_types) + args = vars_to_bytes_list(vars) + steps = KSequence( + [ + set_exit_code(1), + KApply( + 'callTx', + ( + root_acc, + test_sc, + KInt(0), + KList([]), + KWasmString(func), + args, + KInt(5000000000), + KInt(0), + ), + ), + KApply( + 'checkExpectStatus', + [KApply('OK', [])], + ), + set_exit_code(0), + ] + ) + + conf_with_steps = Subst(lhs_subst(init_subst, steps))(sym_conf) + + lhs = CTerm(conf_with_steps, [mlEqualsTrue(c) for c in ctrs]) + + conf_rhs = Subst(rhs_subst(init_subst))(sym_conf) + rhs = CTerm(conf_rhs) + + claim, _ = build_claim(f'{func}', lhs, rhs) + + return claim + + +def lhs_subst(init_subst: dict[str, KInner], steps: KInner) -> dict[str, KInner]: + + subst = { + 'K_CELL': steps, + 'CHECKEDACCOUNTS_CELL': set_of(()), + 'COMMANDS_CELL': KSequence(), + 'INSTRS_CELL': KSequence(), + 'CALLSTACK_CELL': list_of(()), + 'INTERIMSTATES_CELL': list_of(()), + 'EXITCODE_CELL': KInt(0), + 'PRANK_CELL': KToken('false', KSort('Bool')), + } + + copy_cells = [ + 'NEWADDRESSES_CELL', + 'ACCOUNTS_CELL', + 'PREVBLOCKEPOCH_CELL', + 'PREVBLOCKNONCE_CELL', + 'PREVBLOCKRANDOMSEED_CELL', + 'PREVBLOCKROUND_CELL', + 'PREVBLOCKTIMESTAMP_CELL', + 'CURBLOCKEPOCH_CELL', + 'CURBLOCKNONCE_CELL', + 'CURBLOCKRANDOMSEED_CELL', + 'CURBLOCKROUND_CELL', + 'CURBLOCKTIMESTAMP_CELL', + ] + + for c in copy_cells: + subst[c] = init_subst[c] + + return subst + + +def rhs_subst(init_subst: dict[str, KInner]) -> dict[str, KInner]: + + subst = { + 'K_CELL': KSequence(), + 'CHECKEDACCOUNTS_CELL': set_of(()), + 'COMMANDS_CELL': KSequence(), + 'INSTRS_CELL': KSequence(), + 'CALLSTACK_CELL': list_of(()), + 'INTERIMSTATES_CELL': list_of(()), + 'PRANK_CELL': token(False), + 'EXIT_CODE_CELL': token(0), + } + + return subst + + +def vars_to_bytes_list(vars: tuple[KVariable, ...]) -> KInner: + return ListBytes(var_to_bytes(var) for var in vars) + + +def var_to_bytes(var: KVariable) -> KInner: + sort = var.sort + + if sort == KSort('Int'): + return KApply( + 'Int2Bytes', + [ + var, + KToken('BE', 'Endianness'), + KToken('Signed', 'Signedness'), + ], + ) + + raise TypeError(f'Cannot convert sort {sort} to Bytes') + + +def make_vars_and_constraints( + types: tuple[str, ...] +) -> tuple[tuple[KVariable, ...], tuple[KInner, ...]]: + + vars: tuple[KVariable, ...] = () + ctrs: tuple[KInner, ...] = () + for i, typ in enumerate(types): + var, ctr = make_var_and_constraints(f'ARG_{i}', typ) + vars = vars + (var,) + ctrs = ctrs + ctr + + return vars, ctrs + + +def make_var_and_constraints(id: str, typ: str) -> tuple[KVariable, tuple[KInner, ...]]: + ''' + Create a K variable and constraints from a type + ''' + + sort = type_to_sort(typ) + var = KVariable(id, sort) + ctrs = type_to_constraint(typ, var) + + return var, ctrs + + +def type_to_sort(typ: str) -> KSort: + if typ == 'BigUint': + return KSort('Int') + if typ == 'u32': + return KSort('Int') + raise TypeError(f'Unsupported type {typ}') + + +def type_to_constraint(typ: str, var: KVariable) -> tuple[KInner, ...]: + if typ == 'BigUint': + return (leInt(KInt(0), var),) + if typ == 'u32': + return (leInt(KInt(0), var), leInt(var, KInt(4294967295))) + raise TypeError(f'Unsupported type {typ}') + + +# Main Script + + +def main(): + sys.setrecursionlimit(REC_LIMIT) + + parser = argparse.ArgumentParser(description='Symbolic testing for MultiversX contracts') + parser.add_argument( + '-d', '--directory', required=True, help='path to the test contract' + ) + parser.add_argument( + '--gen-claims', + dest='gen_claims', + action='store_true', + help='generate claims for symbolic testing', + ) + parser.add_argument( + '--output-dir', + dest='output_dir', + required=False, + help='directory to store generated claims', + ) + args = parser.parse_args() + + test_dir = args.directory + + # Load test parameters in JSON + input_json = load_input_json(test_dir) + + print('Loading WASM files...') + # Test contract's wasm module + test_wasm = load_wasm(find_test_wasm_path(test_dir)) + + # Load dependency contracts' wasm modules + wasm_paths = (join(test_dir, p) for p in input_json['contract_paths']) + contract_wasms = load_contract_wasms(wasm_paths) + + krun = KRun(Path('.build/defn/llvm/foundry-kompiled')) + + print('Initializing the test...') + sym_conf, init_subst = deploy_test(krun, test_wasm, contract_wasms) + print('Initialization done.') + + test_endpoints = get_test_endpoints(args.directory) + print(f'Tests: { list(test_endpoints.keys()) }') + + if args.gen_claims: + if args.output_dir: + output_dir = Path(args.output_dir) + else: + output_dir = Path('generated_claims') + + print('Generating claims:', output_dir) + generate_claims(krun, test_endpoints, sym_conf, init_subst, output_dir) + else: + run_concrete(krun, test_endpoints, sym_conf, init_subst) + + +if __name__ == '__main__': + main() diff --git a/src/testapi/Cargo.toml b/src/testapi/Cargo.toml new file mode 100644 index 00000000..9ed766ed --- /dev/null +++ b/src/testapi/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "testapi" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[dev-dependencies] +num-bigint = "0.4.2" + +[dependencies.multiversx-sc] +version = "0.42.0" + +[lib] +path = "src/testapi.rs" diff --git a/src/testapi/src/testapi.rs b/src/testapi/src/testapi.rs new file mode 100644 index 00000000..adf7d937 --- /dev/null +++ b/src/testapi/src/testapi.rs @@ -0,0 +1,172 @@ +#![no_std] + +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +#[allow(unused)] +extern "C" { + + fn createAccount( + addressHandle: i32, + nonce: i64, + balanceHandle: i32, + ); + + fn registerNewAddress( + ownerHandle: i32, + nonce: i64, + newAddressHandle: i32, + ); + + fn deployContract( + ownerHandle: i32, + gasLimit: i64, + valueHandle: i32, + codePathHandle: i32, + argumentsHandle: i32, + resultAddressHandle: i32, + ); + + fn setStorage( + addressHandle: i32, + keyHandle: i32, + valueHandle: i32, + ); + + fn getStorage( + addressHandle: i32, + keyHandle: i32, + dstHandle: i32, + ); + + fn assumeBool(p: bool); + fn assertBool(p: bool); + + fn startPrank(addressHandle: i32); + fn stopPrank(); + +} + + +#[allow(unused)] +pub fn create_account( + address: &ManagedAddress, + nonce: u64, + balance: &BigUint, +) { + unsafe { + createAccount( + address.get_raw_handle(), + nonce as i64, + balance.get_raw_handle(), + ); + } +} + +#[allow(unused)] +pub fn register_new_address( + owner: &ManagedAddress, + nonce: u64, + new_address: &ManagedAddress, +) { + unsafe { + registerNewAddress( + owner.get_raw_handle(), + nonce as i64, + new_address.get_raw_handle(), + ); + } +} + +// Deploy a contract whose code was previously fetched using "fetchWasmSource" in Mandos. +#[allow(unused)] +pub fn deploy_contract( + owner: &ManagedAddress, + gas_limit: u64, + value: &BigUint, + code_path: &ManagedBuffer, + arguments: &ManagedArgBuffer, +) -> ManagedAddress { + unsafe { + let mut dest = ManagedAddress::zero(); + + deployContract( + owner.get_raw_handle(), + gas_limit as i64, + value.get_raw_handle(), + code_path.get_raw_handle(), + arguments.get_raw_handle(), + dest.get_raw_handle(), + ); + + dest + } + +} + +// Set storage of any account +#[allow(unused)] +pub fn set_storage( + address: &ManagedAddress, + key: &ManagedBuffer, + value: &ManagedBuffer, +) { + unsafe { + setStorage( + address.get_raw_handle(), + key.get_raw_handle(), + value.get_raw_handle(), + ); + } +} + + +// Get storage of any account +#[allow(unused)] +pub fn get_storage( + address: &ManagedAddress, + key: &ManagedBuffer, +) -> ManagedBuffer { + unsafe { + let mut dest = ManagedBuffer::new(); + + getStorage( + address.get_raw_handle(), + key.get_raw_handle(), + dest.get_raw_handle(), + ); + + dest + } +} + + +// Start a prank: set the caller address for contract calls until stop_prank +#[allow(unused)] +pub fn start_prank(address: &ManagedAddress) { + unsafe { + startPrank(address.get_raw_handle()); + } +} + +// Stop a prank: reset the caller address +#[allow(unused)] +pub fn stop_prank() { + unsafe { + stopPrank(); + } +} + +#[allow(unused)] +pub fn assume(p: bool) { + unsafe { + assumeBool(p); + } +} + +#[allow(unused)] +pub fn assert(p: bool) { + unsafe { + assertBool(p); + } +} diff --git a/tests/contracts/foundrylike/.gitignore b/tests/contracts/foundrylike/.gitignore new file mode 100644 index 00000000..2c76bc98 --- /dev/null +++ b/tests/contracts/foundrylike/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ +*/target/ + +# The mxpy output +/output*/ diff --git a/tests/contracts/foundrylike/Cargo.lock b/tests/contracts/foundrylike/Cargo.lock new file mode 100644 index 00000000..8ae4f5bf --- /dev/null +++ b/tests/contracts/foundrylike/Cargo.lock @@ -0,0 +1,2344 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "bstr" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "once_cell", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bfac9400fe632590700de801b5dfbdca8b6944073832d1284bdbeef7f00e45" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "enumset" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e875f1719c16de097dee81ed675e2d9bb63096823ed3f0ca827b7dea3028bbbb" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "globset" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +dependencies = [ + "aho-corasick 0.7.20", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.9", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "ipnet" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" + +[[package]] +name = "is-terminal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +dependencies = [ + "hermit-abi 0.3.1", + "rustix", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0aa48fab2893d8a49caa94082ae8488f4e1050d73b367881dcd2198f4199fd8" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "multiversx-chain-scenario-format" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5bd3e4bf86e4d8c53f915be3110261432fac45b1defe42c8eebe07c82ab983" +dependencies = [ + "bech32", + "hex", + "num-bigint", + "num-traits", + "serde", + "serde_json", + "sha3 0.9.1", +] + +[[package]] +name = "multiversx-chain-vm" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3455cb385718139ecaa30d2f62aa1ac86762e478333cd24a7a6d8e9f0b1c0c93" +dependencies = [ + "bitflags 1.3.2", + "ed25519-dalek", + "hex", + "hex-literal", + "itertools", + "multiversx-chain-vm-executor", + "num-bigint", + "num-traits", + "rand 0.8.5", + "rand_seeder", + "sha2 0.10.7", + "sha3 0.10.8", +] + +[[package]] +name = "multiversx-chain-vm-executor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e14f14947682eb69459676336dd8b678e2317aa9844724220ce73411bc947c3" +dependencies = [ + "anyhow", + "cfg-if", + "enumset", + "env_logger", + "lazy_static", + "libc", + "log", + "paste", + "thiserror", +] + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags 1.3.2", + "hashbrown 0.13.2", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "num-bigint", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980378ddeed12b646490d8b86d8603a10348cc511160d9124568ca87e36560a2" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "hex", + "lazy_static", + "multiversx-sc", + "pathdiff", + "ruplacer", + "rustc_version", + "serde", + "serde_json", + "toml", +] + +[[package]] +name = "multiversx-sc-scenario" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c260b2c7f1ba4bbdbaf965865de25205f46c850bd294acbe4834200dba83804c" +dependencies = [ + "base64 0.13.1", + "bech32", + "clap", + "colored", + "hex", + "itertools", + "log", + "multiversx-chain-scenario-format", + "multiversx-chain-vm", + "multiversx-chain-vm-executor", + "multiversx-sc", + "multiversx-sc-meta", + "multiversx-sdk", + "num-bigint", + "num-traits", + "pathdiff", + "serde", + "serde_json", + "sha2 0.10.7", + "tokio", +] + +[[package]] +name = "multiversx-sdk" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb48ac185858a4ac825c300643df43344baeafe434fb4f9d9077fb81318f987" +dependencies = [ + "anyhow", + "base64 0.13.1", + "bech32", + "bip39", + "ed25519", + "hex", + "hmac", + "itertools", + "pbkdf2", + "pem", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "sha3 0.9.1", + "tokio", + "zeroize", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.1", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project-lite" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +dependencies = [ + "aho-corasick 1.0.2", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" + +[[package]] +name = "reqwest" +version = "0.11.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +dependencies = [ + "base64 0.21.2", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ruplacer" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1001b63b19333d7a462006c7d281a43ce5c1b3c44cd2a9696ab54b8e9aa7e388" +dependencies = [ + "Inflector", + "anyhow", + "atty", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" + +[[package]] +name = "serde" +version = "1.0.165" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c939f902bb7d0ccc5bce4f03297e161543c2dcb30914faf032c2bd0b7a0d48fc" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.165" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eaae920e25fffe4019b75ff65e7660e72091e59dd204cb5849bbd6a3fd343d7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "serde_json" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "test-adder" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", + "testapi", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "thiserror" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.3", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap 1.9.3", + "serde", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.23", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] diff --git a/tests/contracts/foundrylike/Cargo.toml b/tests/contracts/foundrylike/Cargo.toml new file mode 100644 index 00000000..698c8534 --- /dev/null +++ b/tests/contracts/foundrylike/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "test-adder" +version = "0.0.0" +authors = [ "you",] +edition = "2018" +publish = false + +[lib] +path = "src/test_adder.rs" + +[dev-dependencies] +num-bigint = "0.4.2" + +[dependencies.multiversx-sc] +version = "0.42.0" + +[dev-dependencies.multiversx-sc-scenario] +version = "0.42.0" + +[dependencies] +testapi = { version = "0.1.0", path = "../../../src/testapi" } diff --git a/tests/contracts/foundrylike/foundry.json b/tests/contracts/foundrylike/foundry.json new file mode 100644 index 00000000..00b7434d --- /dev/null +++ b/tests/contracts/foundrylike/foundry.json @@ -0,0 +1,5 @@ +{ + "contract_paths": [ + "../../../deps/mx-sdk-rs/contracts/examples/adder/output/adder.wasm" + ] +} \ No newline at end of file diff --git a/tests/contracts/foundrylike/meta/Cargo.lock b/tests/contracts/foundrylike/meta/Cargo.lock new file mode 100644 index 00000000..05f3a57f --- /dev/null +++ b/tests/contracts/foundrylike/meta/Cargo.lock @@ -0,0 +1,860 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "bstr" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "once_cell", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bfac9400fe632590700de801b5dfbdca8b6944073832d1284bdbeef7f00e45" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "globset" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +dependencies = [ + "aho-corasick 0.7.20", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "is-terminal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +dependencies = [ + "hermit-abi 0.3.1", + "rustix", + "windows-sys", +] + +[[package]] +name = "itoa" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags 1.3.2", + "hashbrown 0.13.2", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "num-bigint", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980378ddeed12b646490d8b86d8603a10348cc511160d9124568ca87e36560a2" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "hex", + "lazy_static", + "multiversx-sc", + "pathdiff", + "ruplacer", + "rustc_version", + "serde", + "serde_json", + "toml", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "proc-macro2" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "regex" +version = "1.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +dependencies = [ + "aho-corasick 1.0.2", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" + +[[package]] +name = "ruplacer" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1001b63b19333d7a462006c7d281a43ce5c1b3c44cd2a9696ab54b8e9aa7e388" +dependencies = [ + "Inflector", + "anyhow", + "atty", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "ryu" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "semver" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" + +[[package]] +name = "serde" +version = "1.0.166" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.166" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + +[[package]] +name = "serde_json" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "test-adder" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "testapi", +] + +[[package]] +name = "test-adder-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "test-adder", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap", + "serde", +] + +[[package]] +name = "unicode-ident" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/tests/contracts/foundrylike/meta/Cargo.toml b/tests/contracts/foundrylike/meta/Cargo.toml new file mode 100644 index 00000000..c9dcbc01 --- /dev/null +++ b/tests/contracts/foundrylike/meta/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "test-adder-meta" +version = "0.0.0" +edition = "2018" +publish = false +authors = [ "you",] + +[dev-dependencies] + +[dependencies.test-adder] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.42.0" diff --git a/tests/contracts/foundrylike/meta/src/main.rs b/tests/contracts/foundrylike/meta/src/main.rs new file mode 100644 index 00000000..d99af930 --- /dev/null +++ b/tests/contracts/foundrylike/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/tests/contracts/foundrylike/multiversx.json b/tests/contracts/foundrylike/multiversx.json new file mode 100644 index 00000000..73655396 --- /dev/null +++ b/tests/contracts/foundrylike/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/tests/contracts/foundrylike/output/test-adder.wat b/tests/contracts/foundrylike/output/test-adder.wat new file mode 100644 index 00000000..04e14259 --- /dev/null +++ b/tests/contracts/foundrylike/output/test-adder.wat @@ -0,0 +1,445 @@ +(module + (type (;0;) (func (param i32 i32 i32))) + (type (;1;) (func (param i32 i32))) + (type (;2;) (func (param i32 i32) (result i32))) + (type (;3;) (func (result i32))) + (type (;4;) (func (param i32 i32 i32) (result i32))) + (type (;5;) (func (param i32 i64))) + (type (;6;) (func (param i32) (result i32))) + (type (;7;) (func (param i32))) + (type (;8;) (func)) + (type (;9;) (func (param i32 i64 i32))) + (type (;10;) (func (param i32 i64 i32 i32 i32 i32))) + (type (;11;) (func (param i32 i32 i64 i32 i32) (result i32))) + (import "env" "getStorage" (func $getStorage (type 0))) + (import "env" "bigIntGetUnsignedArgument" (func $bigIntGetUnsignedArgument (type 1))) + (import "env" "mBufferGetArgument" (func $mBufferGetArgument (type 2))) + (import "env" "getNumArguments" (func $getNumArguments (type 3))) + (import "env" "signalError" (func $signalError (type 1))) + (import "env" "mBufferAppendBytes" (func $mBufferAppendBytes (type 4))) + (import "env" "bigIntSetInt64" (func $bigIntSetInt64 (type 5))) + (import "env" "mBufferSetBytes" (func $mBufferSetBytes (type 4))) + (import "env" "mBufferStorageLoad" (func $mBufferStorageLoad (type 2))) + (import "env" "mBufferGetLength" (func $mBufferGetLength (type 6))) + (import "env" "mBufferStorageStore" (func $mBufferStorageStore (type 2))) + (import "env" "managedSignalError" (func $managedSignalError (type 7))) + (import "env" "mBufferToBigIntUnsigned" (func $mBufferToBigIntUnsigned (type 2))) + (import "env" "bigIntCmp" (func $bigIntCmp (type 2))) + (import "env" "checkNoPayment" (func $checkNoPayment (type 8))) + (import "env" "createAccount" (func $createAccount (type 9))) + (import "env" "registerNewAddress" (func $registerNewAddress (type 9))) + (import "env" "deployContract" (func $deployContract (type 10))) + (import "env" "assertBool" (func $assertBool (type 7))) + (import "env" "assumeBool" (func $assumeBool (type 7))) + (import "env" "mBufferFromBigIntUnsigned" (func $mBufferFromBigIntUnsigned (type 2))) + (import "env" "startPrank" (func $startPrank (type 7))) + (import "env" "managedTransferValueExecute" (func $managedTransferValueExecute (type 11))) + (import "env" "stopPrank" (func $stopPrank (type 8))) + (import "env" "bigIntAdd" (func $bigIntAdd (type 0))) + (func $_ZN10test_adder7testapi11get_storage17h0f6fc7df6bc2eeadE (type 2) (param i32 i32) (result i32) + (local i32) + local.get 0 + local.get 1 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E + local.tee 2 + call $getStorage + local.get 2) + (func $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E (type 3) (result i32) + (local i32) + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 0 + i32.const 131264 + i32.const 0 + call $mBufferSetBytes + drop + local.get 0) + (func $_ZN13multiversx_sc2io16arg_nested_tuple15load_single_arg17h5adcf70ad3da9e3bE (type 3) (result i32) + (local i32) + i32.const 0 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 0 + call $bigIntGetUnsignedArgument + local.get 0) + (func $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E (type 3) (result i32) + (local i32) + i32.const 0 + i32.const 0 + i32.load offset=131280 + i32.const -1 + i32.add + local.tee 0 + i32.store offset=131280 + local.get 0) + (func $_ZN13multiversx_sc2io16arg_nested_tuple15load_single_arg17h96df476d5f21ac7fE (type 3) (result i32) + (local i32) + i32.const 0 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 0 + call $mBufferGetArgument + drop + local.get 0) + (func $_ZN13multiversx_sc2io16arg_nested_tuple22check_num_arguments_eq17h4531d068dcf210c3E (type 8) + block ;; label = @1 + call $getNumArguments + i32.const 1 + i32.ne + br_if 0 (;@1;) + return + end + i32.const 131142 + i32.const 25 + call $signalError + unreachable) + (func $_ZN13multiversx_sc5types11interaction18arg_buffer_managed25ManagedArgBuffer$LT$M$GT$12push_arg_raw17h7ff953cddf7c9b4cE (type 1) (param i32 i32) + (local i32) + global.get $__stack_pointer + i32.const 16 + i32.sub + local.tee 2 + global.set $__stack_pointer + local.get 2 + local.get 1 + i32.const 24 + i32.shl + local.get 1 + i32.const 8 + i32.shl + i32.const 16711680 + i32.and + i32.or + local.get 1 + i32.const 8 + i32.shr_u + i32.const 65280 + i32.and + local.get 1 + i32.const 24 + i32.shr_u + i32.or + i32.or + i32.store offset=12 + local.get 0 + local.get 2 + i32.const 12 + i32.add + i32.const 4 + call $mBufferAppendBytes + drop + local.get 2 + i32.const 16 + i32.add + global.set $__stack_pointer) + (func $_ZN13multiversx_sc5types7managed5basic11big_num_cmp12cmp_conv_i6417heca673c848fc1850E (type 2) (param i32 i32) (result i32) + i32.const -14 + local.get 1 + i64.extend_i32_u + call $bigIntSetInt64 + local.get 0 + i32.const -14 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types16big_int_api_node143_$LT$impl$u20$multiversx_sc..api..managed_types..big_int_api..BigIntApi$u20$for$u20$multiversx_sc_wasm_adapter..api..vm_api_node..VmApiImpl$GT$6bi_cmp17h9a32bacca2fc7900E) + (func $_ZN26multiversx_sc_wasm_adapter3api13managed_types16big_int_api_node143_$LT$impl$u20$multiversx_sc..api..managed_types..big_int_api..BigIntApi$u20$for$u20$multiversx_sc_wasm_adapter..api..vm_api_node..VmApiImpl$GT$6bi_cmp17h9a32bacca2fc7900E (type 2) (param i32 i32) (result i32) + i32.const -1 + local.get 0 + local.get 1 + call $bigIntCmp + local.tee 1 + i32.const 0 + i32.ne + local.get 1 + i32.const 0 + i32.lt_s + select) + (func $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE (type 2) (param i32 i32) (result i32) + (local i32) + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 2 + local.get 0 + local.get 1 + call $mBufferSetBytes + drop + local.get 2) + (func $_ZN13multiversx_sc5types7managed7wrapped15managed_address23ManagedAddress$LT$M$GT$14new_from_bytes17hfebfa00773c6ac8aE (type 6) (param i32) (result i32) + local.get 0 + i32.const 32 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE) + (func $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3get17h56f4e9100b96789bE (type 6) (param i32) (result i32) + (local i32) + local.get 0 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 1 + call $mBufferStorageLoad + drop + block ;; label = @1 + local.get 1 + call $mBufferGetLength + i32.const 32 + i32.eq + br_if 0 (;@1;) + call $_ZN147_$LT$multiversx_sc..storage..storage_get..StorageGetErrorHandler$LT$M$GT$$u20$as$u20$multiversx_sc_codec..codec_err_handler..DecodeErrorHandler$GT$12handle_error17hfc8d8970d478063dE + unreachable + end + local.get 1) + (func $_ZN147_$LT$multiversx_sc..storage..storage_get..StorageGetErrorHandler$LT$M$GT$$u20$as$u20$multiversx_sc_codec..codec_err_handler..DecodeErrorHandler$GT$12handle_error17hfc8d8970d478063dE (type 8) + (local i32) + i32.const 131199 + i32.const 22 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE + local.tee 0 + i32.const 131221 + i32.const 16 + call $mBufferAppendBytes + drop + local.get 0 + call $managedSignalError + unreachable) + (func $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3set17h5e176ce0eba59e0dE (type 1) (param i32 i32) + local.get 0 + local.get 1 + call $mBufferStorageStore + drop) + (func $_ZN151_$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$u20$as$u20$core..convert..From$LT$$RF$$u5b$u8$u3b$$u20$N$u5d$$GT$$GT$4from17he240dc3bfb601013E (type 6) (param i32) (result i32) + local.get 0 + i32.const 3 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE) + (func $_ZN188_$LT$multiversx_sc..types..managed..basic..big_uint..BigUint$LT$M$GT$$u20$as$u20$core..convert..From$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$GT$$GT$4from17h17fbd1e709c14d7dE (type 6) (param i32) (result i32) + (local i32) + local.get 0 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 1 + call $mBufferToBigIntUnsigned + drop + local.get 1) + (func $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13adder_address17h767fffc7ab54771fE (type 3) (result i32) + i32.const 131237 + i32.const 12 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE) + (func $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13owner_address17h9717f9fdba324c1eE (type 3) (result i32) + i32.const 131249 + i32.const 12 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$14new_from_bytes17h3480de959300e7ffE) + (func $rust_begin_unwind (type 8) + call $_ZN26multiversx_sc_wasm_adapter5panic9panic_fmt17h40f4cb8688aa3b78E + unreachable) + (func $_ZN26multiversx_sc_wasm_adapter5panic9panic_fmt17h40f4cb8688aa3b78E (type 8) + i32.const 131264 + i32.const 14 + call $signalError + unreachable) + (func $init (type 8) + (local i32 i32 i32 i32 i32 i32 i32) + global.get $__stack_pointer + i32.const 16 + i32.sub + local.tee 0 + global.set $__stack_pointer + call $checkNoPayment + call $_ZN13multiversx_sc2io16arg_nested_tuple22check_num_arguments_eq17h4531d068dcf210c3E + call $_ZN13multiversx_sc2io16arg_nested_tuple15load_single_arg17h96df476d5f21ac7fE + local.set 1 + i32.const 131078 + call $_ZN13multiversx_sc5types7managed7wrapped15managed_address23ManagedAddress$LT$M$GT$14new_from_bytes17hfebfa00773c6ac8aE + local.set 2 + call $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13owner_address17h9717f9fdba324c1eE + local.get 2 + call $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3set17h5e176ce0eba59e0dE + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 3 + i64.const 0 + call $bigIntSetInt64 + local.get 2 + i64.const 1 + local.get 3 + call $createAccount + local.get 2 + i64.const 1 + i32.const 131110 + call $_ZN13multiversx_sc5types7managed7wrapped15managed_address23ManagedAddress$LT$M$GT$14new_from_bytes17hfebfa00773c6ac8aE + call $registerNewAddress + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E + local.set 4 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E + local.set 5 + local.get 0 + i64.const 360287970189639680 + i64.store offset=8 + i32.const 0 + local.set 3 + block ;; label = @1 + loop ;; label = @2 + local.get 3 + i32.const 8 + i32.eq + br_if 1 (;@1;) + block ;; label = @3 + block ;; label = @4 + local.get 0 + i32.const 8 + i32.add + local.get 3 + i32.add + local.tee 6 + i32.load8_u + i32.eqz + br_if 0 (;@4;) + local.get 3 + i32.const 9 + i32.lt_u + br_if 1 (;@3;) + local.get 3 + call $_ZN4core5slice5index26slice_start_index_len_fail17hfcd17f2b16d3e7c7E + unreachable + end + local.get 3 + i32.const 1 + i32.add + local.set 3 + br 1 (;@2;) + end + end + local.get 5 + local.get 6 + i32.const 8 + local.get 3 + i32.sub + call $mBufferSetBytes + drop + local.get 4 + local.get 5 + call $_ZN13multiversx_sc5types11interaction18arg_buffer_managed25ManagedArgBuffer$LT$M$GT$12push_arg_raw17h7ff953cddf7c9b4cE + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 6 + i64.const 0 + call $bigIntSetInt64 + local.get 2 + i64.const 5000000000000 + local.get 6 + local.get 1 + local.get 4 + i32.const 131167 + call $_ZN13multiversx_sc5types7managed7wrapped15managed_address23ManagedAddress$LT$M$GT$14new_from_bytes17hfebfa00773c6ac8aE + local.tee 3 + call $deployContract + call $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13adder_address17h767fffc7ab54771fE + local.get 3 + call $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3set17h5e176ce0eba59e0dE + local.get 3 + i32.const 131075 + call $_ZN151_$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$u20$as$u20$core..convert..From$LT$$RF$$u5b$u8$u3b$$u20$N$u5d$$GT$$GT$4from17he240dc3bfb601013E + call $_ZN10test_adder7testapi11get_storage17h0f6fc7df6bc2eeadE + call $_ZN188_$LT$multiversx_sc..types..managed..basic..big_uint..BigUint$LT$M$GT$$u20$as$u20$core..convert..From$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$GT$$GT$4from17h17fbd1e709c14d7dE + i32.const 5 + call $_ZN13multiversx_sc5types7managed5basic11big_num_cmp12cmp_conv_i6417heca673c848fc1850E + i32.const 255 + i32.and + i32.eqz + call $assertBool + local.get 0 + i32.const 16 + i32.add + global.set $__stack_pointer + return + end + call $_ZN4core9panicking18panic_bounds_check17h00851e534fe3a3c6E + unreachable) + (func $_ZN4core5slice5index26slice_start_index_len_fail17hfcd17f2b16d3e7c7E (type 7) (param i32) + local.get 0 + call $_ZN4core5slice5index29slice_start_index_len_fail_rt17h1be5bb825b955d6fE + unreachable) + (func $_ZN4core9panicking18panic_bounds_check17h00851e534fe3a3c6E (type 8) + call $_ZN4core9panicking9panic_fmt17h6e5483b5a3d4ae69E + unreachable) + (func $test_call_add (type 8) + (local i32 i32 i32 i32 i32) + call $checkNoPayment + call $_ZN13multiversx_sc2io16arg_nested_tuple22check_num_arguments_eq17h4531d068dcf210c3E + call $_ZN13multiversx_sc2io16arg_nested_tuple15load_single_arg17h5adcf70ad3da9e3bE + local.tee 0 + i32.const 100 + call $_ZN13multiversx_sc5types7managed5basic11big_num_cmp12cmp_conv_i6417heca673c848fc1850E + i32.const 1 + i32.add + i32.const 255 + i32.and + i32.const 2 + i32.lt_u + call $assumeBool + call $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13owner_address17h9717f9fdba324c1eE + call $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3get17h56f4e9100b96789bE + local.set 1 + call $_ZN43_$LT$C$u20$as$u20$test_adder..TestAdder$GT$13adder_address17h767fffc7ab54771fE + call $_ZN13multiversx_sc7storage7mappers19single_value_mapper31SingleValueMapper$LT$SA$C$T$GT$3get17h56f4e9100b96789bE + local.set 2 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E + local.set 3 + call $_ZN13multiversx_sc5types7managed5basic14managed_buffer22ManagedBuffer$LT$M$GT$3new17h0a77c78b0d17cd81E + drop + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 4 + local.get 0 + call $mBufferFromBigIntUnsigned + drop + local.get 3 + local.get 4 + call $_ZN13multiversx_sc5types11interaction18arg_buffer_managed25ManagedArgBuffer$LT$M$GT$12push_arg_raw17h7ff953cddf7c9b4cE + local.get 1 + call $startPrank + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types19static_var_api_node11next_handle17h8c99ac0db9362219E + local.tee 1 + i64.const 0 + call $bigIntSetInt64 + local.get 2 + local.get 1 + i64.const 5000000 + i32.const 131072 + call $_ZN151_$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$u20$as$u20$core..convert..From$LT$$RF$$u5b$u8$u3b$$u20$N$u5d$$GT$$GT$4from17he240dc3bfb601013E + local.get 3 + call $managedTransferValueExecute + local.set 3 + call $stopPrank + block ;; label = @1 + local.get 3 + i32.eqz + br_if 0 (;@1;) + call $_ZN4core9panicking18panic_bounds_check17h00851e534fe3a3c6E + unreachable + end + local.get 2 + i32.const 131075 + call $_ZN151_$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$u20$as$u20$core..convert..From$LT$$RF$$u5b$u8$u3b$$u20$N$u5d$$GT$$GT$4from17he240dc3bfb601013E + call $_ZN10test_adder7testapi11get_storage17h0f6fc7df6bc2eeadE + call $_ZN188_$LT$multiversx_sc..types..managed..basic..big_uint..BigUint$LT$M$GT$$u20$as$u20$core..convert..From$LT$multiversx_sc..types..managed..basic..managed_buffer..ManagedBuffer$LT$M$GT$$GT$$GT$4from17h17fbd1e709c14d7dE + local.set 3 + i32.const -14 + i64.const 5 + call $bigIntSetInt64 + local.get 0 + local.get 0 + i32.const -14 + call $bigIntAdd + local.get 3 + local.get 0 + call $_ZN26multiversx_sc_wasm_adapter3api13managed_types16big_int_api_node143_$LT$impl$u20$multiversx_sc..api..managed_types..big_int_api..BigIntApi$u20$for$u20$multiversx_sc_wasm_adapter..api..vm_api_node..VmApiImpl$GT$6bi_cmp17h9a32bacca2fc7900E + i32.const 255 + i32.and + i32.eqz + call $assertBool) + (func $callBack (type 8)) + (func $_ZN4core9panicking9panic_fmt17h6e5483b5a3d4ae69E (type 8) + call $rust_begin_unwind + unreachable) + (func $_ZN4core5slice5index29slice_start_index_len_fail_rt17h1be5bb825b955d6fE (type 7) (param i32) + call $_ZN4core9panicking9panic_fmt17h6e5483b5a3d4ae69E + unreachable) + (table (;0;) 1 1 funcref) + (memory (;0;) 3) + (global $__stack_pointer (mut i32) (i32.const 131072)) + (global (;1;) i32 (i32.const 131284)) + (global (;2;) i32 (i32.const 131296)) + (export "memory" (memory 0)) + (export "init" (func $init)) + (export "test_call_add" (func $test_call_add)) + (export "callBack" (func $callBack)) + (export "__data_end" (global 1)) + (export "__heap_base" (global 2)) + (data $.rodata (i32.const 131072) "addsumowner___________________________adder___________________________wrong number of arguments\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00storage decode error: bad array lengthadderAddressownerAddress\00\00\00panic occurred") + (data $.data (i32.const 131280) "\9c\ff\ff\ff")) diff --git a/tests/contracts/foundrylike/scenarios/test-adder.scen.json b/tests/contracts/foundrylike/scenarios/test-adder.scen.json new file mode 100644 index 00000000..3219956f --- /dev/null +++ b/tests/contracts/foundrylike/scenarios/test-adder.scen.json @@ -0,0 +1,71 @@ +{ + "name": "test-adder", + "comment": "run foundry-like test for Adder", + "gasSchedule": "v3", + "steps": [ + { + "step": "setState", + "accounts": { + "address:k": { + "nonce": "1", + "balance": "100000" + } + }, + "newAddresses": [ + { + "creatorAddress": "address:k", + "creatorNonce": "1", + "newAddress": "sc:k-test" + } + ] + }, + { + "step": "fetchWasmSource", + "wasmPath": "file:../../../../deps/mx-sdk-rs/contracts/examples/adder/output/adder.wasm" + }, + { + "step": "scDeploy", + "id": "deploy test", + "comment": "deploy the test contract", + "tx": { + "from": "address:k", + "contractCode": "file:../output/test-adder.wasm", + "arguments": [ + "file:../../../../deps/mx-sdk-rs/contracts/examples/adder/output/adder.wasm" + ], + "gasLimit": "5,000,000,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "call test", + "comment": "call the parametric test endpoint with a concrete value", + "tx": { + "from": "address:k", + "to": "sc:k-test", + "function": "test_call_add", + "value": "0", + "arguments": [ + "3" + ], + "gasLimit": "5,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + } + ] +} \ No newline at end of file diff --git a/tests/contracts/foundrylike/src/test_adder.rs b/tests/contracts/foundrylike/src/test_adder.rs new file mode 100644 index 00000000..e33380a4 --- /dev/null +++ b/tests/contracts/foundrylike/src/test_adder.rs @@ -0,0 +1,91 @@ +#![no_std] + +use testapi; + +multiversx_sc::imports!(); + +static INIT_SUM : u32 = 5u32; +#[multiversx_sc::contract] +pub trait TestAdder { + + #[storage_mapper("ownerAddress")] + fn owner_address(&self) -> SingleValueMapper; + + #[storage_mapper("adderAddress")] + fn adder_address(&self) -> SingleValueMapper; + + /// Create the owner account and deploy adder + #[init] + fn init(&self, code_path: ManagedBuffer) { + + // create the owner account + let owner = ManagedAddress::from(b"owner___________________________"); + self.owner_address().set(&owner); + + testapi::create_account(&owner, 1, &BigUint::from(0u64)); + + // register an address for the contract to be deployed + let adder = ManagedAddress::from(b"adder___________________________"); + testapi::register_new_address(&owner, 1, &adder, ); + + // deploy the adder contract + let mut adder_init_args = ManagedArgBuffer::new(); + adder_init_args.push_arg(INIT_SUM); // initial sum + + // deploy a contract from `owner` + let adder = testapi::deploy_contract( + &owner, + 5000000000000, + &BigUint::zero(), + &code_path, + &adder_init_args, + ); + + // save the deployed contract's address + self.adder_address().set(&adder); + + // check the initial sum value + let sum_as_bytes = testapi::get_storage(&adder, &ManagedBuffer::from(b"sum")); + let sum = BigUint::from(sum_as_bytes); + testapi::assert( sum == INIT_SUM ); + + } + + // Make a call from 'owner' to 'adder' and check the sum value + #[endpoint(test_call_add)] + fn test_call_add(&self, value: BigUint) { + + testapi::assume(value <= 100u32); + + let owner = self.owner_address().get(); + let adder = self.adder_address().get(); + + let mut adder_init_args = ManagedArgBuffer::new(); + adder_init_args.push_arg(&value); // initial sum + + // start a prank and call 'adder' from 'owner' + testapi::start_prank(&owner); + let res = self.send_raw().direct_egld_execute( + &adder, + &BigUint::from(0u32), + 5000000, + &ManagedBuffer::from(b"add"), + &adder_init_args, + ); + testapi::stop_prank(); + + match res { + Result::Err(_) => panic!("call failed"), + Result::Ok(_) => () + }; + + // check the sum value + let sum_as_bytes = testapi::get_storage(&adder, &ManagedBuffer::from(b"sum")); + let sum = BigUint::from(sum_as_bytes); + testapi::assert( sum == (value + INIT_SUM) ); + + // testapi::assert( sum <= (INIT_SUM + 1234u32) ); + + } + +} diff --git a/tests/contracts/foundrylike/wasm/Cargo.lock b/tests/contracts/foundrylike/wasm/Cargo.lock new file mode 100644 index 00000000..a04dc0cf --- /dev/null +++ b/tests/contracts/foundrylike/wasm/Cargo.lock @@ -0,0 +1,227 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags", + "hashbrown", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-wasm-adapter" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951b0137614c8412554ccd086967c565af38b91b77a66b5d9f433801ff24e501" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "proc-macro2" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "test-adder" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "testapi", +] + +[[package]] +name = "test-adder-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "test-adder", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "unicode-ident" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" diff --git a/tests/contracts/foundrylike/wasm/Cargo.toml b/tests/contracts/foundrylike/wasm/Cargo.toml new file mode 100644 index 00000000..e6f32e66 --- /dev/null +++ b/tests/contracts/foundrylike/wasm/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "test-adder-wasm" +version = "0.0.0" +edition = "2018" +publish = false +authors = [ "you",] + +[lib] +crate-type = [ "cdylib",] + +[workspace] +members = [ ".",] + +[dev-dependencies] + +[profile.release] +codegen-units = 1 +opt-level = "z" +lto = true +debug = false +panic = "abort" + +[dependencies.test-adder] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.42.0" diff --git a/tests/contracts/foundrylike/wasm/src/lib.rs b/tests/contracts/foundrylike/wasm/src/lib.rs new file mode 100644 index 00000000..09458f2a --- /dev/null +++ b/tests/contracts/foundrylike/wasm/src/lib.rs @@ -0,0 +1,26 @@ +// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 1 +// Async Callback (empty): 1 +// Total number of exported functions: 3 + +#![no_std] +#![feature(lang_items)] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + test_adder + ( + init => init + test_call_add => test_call_add + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/tests/contracts/test_multisig/.gitignore b/tests/contracts/test_multisig/.gitignore new file mode 100644 index 00000000..2c76bc98 --- /dev/null +++ b/tests/contracts/test_multisig/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ +*/target/ + +# The mxpy output +/output*/ diff --git a/tests/contracts/test_multisig/Cargo.lock b/tests/contracts/test_multisig/Cargo.lock new file mode 100644 index 00000000..ab126ae0 --- /dev/null +++ b/tests/contracts/test_multisig/Cargo.lock @@ -0,0 +1,2399 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "bstr" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "once_cell", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +dependencies = [ + "is-terminal", + "lazy_static", + "windows-sys", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "enumset" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e875f1719c16de097dee81ed675e2d9bb63096823ed3f0ca827b7dea3028bbbb" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "globset" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.9", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "ipnet" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.2", + "rustix", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "multiversx-chain-scenario-format" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5bd3e4bf86e4d8c53f915be3110261432fac45b1defe42c8eebe07c82ab983" +dependencies = [ + "bech32", + "hex", + "num-bigint", + "num-traits", + "serde", + "serde_json", + "sha3 0.9.1", +] + +[[package]] +name = "multiversx-chain-vm" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3455cb385718139ecaa30d2f62aa1ac86762e478333cd24a7a6d8e9f0b1c0c93" +dependencies = [ + "bitflags 1.3.2", + "ed25519-dalek", + "hex", + "hex-literal", + "itertools", + "multiversx-chain-vm-executor", + "num-bigint", + "num-traits", + "rand 0.8.5", + "rand_seeder", + "sha2 0.10.7", + "sha3 0.10.8", +] + +[[package]] +name = "multiversx-chain-vm-executor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e14f14947682eb69459676336dd8b678e2317aa9844724220ce73411bc947c3" +dependencies = [ + "anyhow", + "cfg-if", + "enumset", + "env_logger", + "lazy_static", + "libc", + "log", + "paste", + "thiserror", +] + +[[package]] +name = "multiversx-sc" +version = "0.41.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfbe80ec68fedf299dd65469f8999cf3c0f884ffa497122428f08303bcb8b884" +dependencies = [ + "bitflags 1.3.2", + "hashbrown 0.13.2", + "hex-literal", + "multiversx-sc-codec 0.17.2", + "multiversx-sc-derive 0.41.3", + "num-traits", +] + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags 1.3.2", + "hashbrown 0.13.2", + "hex-literal", + "multiversx-sc-codec 0.18.0", + "multiversx-sc-derive 0.42.0", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d70ea458247d263b7e9fdfb207530b6a530546247139c162450e515c013a18" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive 0.17.2", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive 0.18.0", + "num-bigint", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad6920f80fda67fc60fd51aaa9f83ec7e069470f60a068c81205f9da5d05a30" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.41.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c2b87d817f2176bf1830bef938884f24267516c334a377e71a96bc18ebb09c1" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980378ddeed12b646490d8b86d8603a10348cc511160d9124568ca87e36560a2" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "hex", + "lazy_static", + "multiversx-sc 0.42.0", + "pathdiff", + "ruplacer", + "rustc_version", + "serde", + "serde_json", + "toml", +] + +[[package]] +name = "multiversx-sc-scenario" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c260b2c7f1ba4bbdbaf965865de25205f46c850bd294acbe4834200dba83804c" +dependencies = [ + "base64 0.13.1", + "bech32", + "clap", + "colored", + "hex", + "itertools", + "log", + "multiversx-chain-scenario-format", + "multiversx-chain-vm", + "multiversx-chain-vm-executor", + "multiversx-sc 0.42.0", + "multiversx-sc-meta", + "multiversx-sdk", + "num-bigint", + "num-traits", + "pathdiff", + "serde", + "serde_json", + "sha2 0.10.7", + "tokio", +] + +[[package]] +name = "multiversx-sdk" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb48ac185858a4ac825c300643df43344baeafe434fb4f9d9077fb81318f987" +dependencies = [ + "anyhow", + "base64 0.13.1", + "bech32", + "bip39", + "ed25519", + "hex", + "hmac", + "itertools", + "pbkdf2", + "pem", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "sha3 0.9.1", + "tokio", + "zeroize", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.2", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project-lite" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "reqwest" +version = "0.11.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +dependencies = [ + "base64 0.21.2", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ruplacer" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1001b63b19333d7a462006c7d281a43ce5c1b3c44cd2a9696ab54b8e9aa7e388" +dependencies = [ + "Inflector", + "anyhow", + "atty", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "serde_json" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "test_multisig" +version = "0.0.0" +dependencies = [ + "multiversx-sc 0.42.0", + "multiversx-sc-scenario", + "num-bigint", + "testapi", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc 0.41.3", +] + +[[package]] +name = "thiserror" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.3", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap 1.9.3", + "serde", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.29", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] diff --git a/tests/contracts/test_multisig/Cargo.toml b/tests/contracts/test_multisig/Cargo.toml new file mode 100644 index 00000000..bc3a9b95 --- /dev/null +++ b/tests/contracts/test_multisig/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "test_multisig" +version = "0.0.0" +authors = [ "you",] +edition = "2018" +publish = false + +[lib] +path = "src/test_multisig.rs" + +[dev-dependencies] +num-bigint = "0.4.2" + +[dependencies.multiversx-sc] +version = "0.42.0" + +[dev-dependencies.multiversx-sc-scenario] +version = "0.42.0" + +[dependencies] +testapi = { version = "0.1.0", path = "../../../src/testapi" } diff --git a/tests/contracts/test_multisig/foundry.json b/tests/contracts/test_multisig/foundry.json new file mode 100644 index 00000000..eac6b162 --- /dev/null +++ b/tests/contracts/test_multisig/foundry.json @@ -0,0 +1,5 @@ +{ + "contract_paths": [ + "../../../deps/mx-sdk-rs/contracts/examples/multisig/output/multisig.wasm" + ] +} \ No newline at end of file diff --git a/tests/contracts/test_multisig/meta/Cargo.lock b/tests/contracts/test_multisig/meta/Cargo.lock new file mode 100644 index 00000000..3c33f867 --- /dev/null +++ b/tests/contracts/test_multisig/meta/Cargo.lock @@ -0,0 +1,863 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "bstr" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "once_cell", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +dependencies = [ + "is-terminal", + "lazy_static", + "windows-sys", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "globset" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aca8bbd8e0707c1887a8bbb7e6b40e228f251ff5d62c8220a4a7a53c73aff006" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.2", + "rustix", + "windows-sys", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags 1.3.2", + "hashbrown 0.13.2", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "num-bigint", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn 1.0.109", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980378ddeed12b646490d8b86d8603a10348cc511160d9124568ca87e36560a2" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "hex", + "lazy_static", + "multiversx-sc", + "pathdiff", + "ruplacer", + "rustc_version", + "serde", + "serde_json", + "toml", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "ruplacer" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1001b63b19333d7a462006c7d281a43ce5c1b3c44cd2a9696ab54b8e9aa7e388" +dependencies = [ + "Inflector", + "anyhow", + "atty", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.178" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60363bdd39a7be0266a520dab25fdc9241d2f987b08a01e01f0ec6d06a981348" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.178" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28482318d6641454cb273da158647922d1be6b5a2fcc6165cd89ebdd7ed576b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "test_multisig" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "testapi", +] + +[[package]] +name = "test_multisig-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "test_multisig", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap", + "serde", +] + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/tests/contracts/test_multisig/meta/Cargo.toml b/tests/contracts/test_multisig/meta/Cargo.toml new file mode 100644 index 00000000..f5c007b1 --- /dev/null +++ b/tests/contracts/test_multisig/meta/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "test_multisig-meta" +version = "0.0.0" +edition = "2018" +publish = false +authors = [ "you",] + +[dev-dependencies] + +[dependencies.test_multisig] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.42.0" diff --git a/tests/contracts/test_multisig/meta/src/main.rs b/tests/contracts/test_multisig/meta/src/main.rs new file mode 100644 index 00000000..3c6c5553 --- /dev/null +++ b/tests/contracts/test_multisig/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/tests/contracts/test_multisig/multiversx.json b/tests/contracts/test_multisig/multiversx.json new file mode 100644 index 00000000..73655396 --- /dev/null +++ b/tests/contracts/test_multisig/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/tests/contracts/test_multisig/src/test_multisig.rs b/tests/contracts/test_multisig/src/test_multisig.rs new file mode 100644 index 00000000..1dc19d9a --- /dev/null +++ b/tests/contracts/test_multisig/src/test_multisig.rs @@ -0,0 +1,134 @@ +#![no_std] + +use testapi; + +multiversx_sc::imports!(); + +static OWNER : &[u8; 32] = b"owner___________________________"; +static ALICE : &[u8; 32] = b"alice___________________________"; +static BOB : &[u8; 32] = b"bob_____________________________"; +static CHARLIE : &[u8; 32] = b"charlie_________________________"; +static MULTISIG : &[u8; 32] = b"multisig________________________"; + +#[multiversx_sc::contract] +pub trait TestMultisigContract { + + #[init] + fn init(&self, code_path: ManagedBuffer) { + + self.init_accounts(); + self.deploy(&code_path); + + } + + + fn init_accounts(&self) { + let owner = ManagedAddress::from(OWNER); + testapi::create_account(&owner, 0, &BigUint::from(0u64)); + testapi::create_account(&ManagedAddress::from(ALICE), 0, &BigUint::from(0u64)); + testapi::create_account(&ManagedAddress::from(BOB), 0, &BigUint::from(0u64)); + testapi::create_account(&ManagedAddress::from(CHARLIE), 0, &BigUint::from(0u64)); + + let multisig = ManagedAddress::from(MULTISIG); + testapi::register_new_address(&owner, 0, &multisig); + + } + + fn deploy(&self, code_path: &ManagedBuffer) { + + let mut init_args = ManagedArgBuffer::new(); + init_args.push_arg(2); // quorum = 2 + init_args.push_arg(ManagedAddress::from(ALICE)); // board members = alice, bob, charlie + init_args.push_arg(ManagedAddress::from(BOB)); + init_args.push_arg(ManagedAddress::from(CHARLIE)); + + let multisig = testapi::deploy_contract( + &ManagedAddress::from(OWNER), + 5000000000000, + &BigUint::zero(), + code_path, + &init_args, + ); + + testapi::assert( self.get_quorum(&multisig) == 2u32 ); + testapi::assert( self.get_num_board_members(&multisig) == 3u32 ); + + } + + fn get_quorum(&self, multisig: &ManagedAddress) -> BigUint { + let bs = testapi::get_storage(&multisig, &ManagedBuffer::from(b"quorum")); + BigUint::from(bs) + } + + fn get_num_board_members(&self, multisig: &ManagedAddress) -> BigUint { + let bs = testapi::get_storage(&multisig, &ManagedBuffer::from(b"num_board_members")); + BigUint::from(bs) + } + + #[endpoint(test_change_quorum)] + fn test_change_quorum(&self, value: BigUint) { + let multisig = ManagedAddress::from(MULTISIG); + let alice = ManagedAddress::from(ALICE); + let bob = ManagedAddress::from(BOB); + + // make assumptions + testapi::assume(value <= self.get_num_board_members(&multisig)); + + + self.change_quorum_propose(&multisig, &alice, &value); + self.change_quorum_sign(&multisig, &bob); + self.perform_action(&multisig, &alice); + + // check the final quorum + testapi::assert(value == self.get_quorum(&multisig)); + } + + fn change_quorum_propose(&self, multisig: &ManagedAddress, proposer: &ManagedAddress, value: &BigUint) { + let mut args = ManagedArgBuffer::new(); + args.push_arg(value); + + testapi::start_prank(&proposer); + let _ = self.send_raw().direct_egld_execute( + &multisig, + &BigUint::from(0u32), + 5000000, + &ManagedBuffer::from(b"proposeChangeQuorum"), + &args, + ); + testapi::stop_prank(); + + } + + fn change_quorum_sign(&self, multisig: &ManagedAddress, signer: &ManagedAddress) { + let mut args = ManagedArgBuffer::new(); + args.push_arg(1u32); + + testapi::start_prank(signer); + let _ = self.send_raw().direct_egld_execute( + &multisig, + &BigUint::from(0u32), + 5000000, + &ManagedBuffer::from(b"sign"), + &args, + ); + testapi::stop_prank(); + + } + + fn perform_action(&self, multisig: &ManagedAddress, performer: &ManagedAddress) { + let mut args = ManagedArgBuffer::new(); + args.push_arg(1u32); + + testapi::start_prank(performer); + let _ = self.send_raw().direct_egld_execute( + &multisig, + &BigUint::from(0u32), + 5000000, + &ManagedBuffer::from(b"performAction"), + &args, + ); + testapi::stop_prank(); + + } + +} diff --git a/tests/contracts/test_multisig/wasm/Cargo.lock b/tests/contracts/test_multisig/wasm/Cargo.lock new file mode 100644 index 00000000..db2c5631 --- /dev/null +++ b/tests/contracts/test_multisig/wasm/Cargo.lock @@ -0,0 +1,227 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "multiversx-sc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22c2d1e82a357b6f397f87d475314628473b8a88882aa407234197f596786aa" +dependencies = [ + "bitflags", + "hashbrown", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c97dc9e9f34f836de6a56386ddbe1b9e87e20916ff86b1ea728c08e1871ac2" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ab795364fcf0452a953e33eae7e0c22d1a6374ffeb0724d24a42727e099c6e" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d77a125ea6985b2fa5cf1a297cdb9202c5a528eebb22652cc68ab1a9305e11" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-wasm-adapter" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951b0137614c8412554ccd086967c565af38b91b77a66b5d9f433801ff24e501" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "proc-macro2" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "test_multisig" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "testapi", +] + +[[package]] +name = "test_multisig-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "test_multisig", +] + +[[package]] +name = "testapi" +version = "0.1.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "unicode-ident" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" diff --git a/tests/contracts/test_multisig/wasm/Cargo.toml b/tests/contracts/test_multisig/wasm/Cargo.toml new file mode 100644 index 00000000..7be2b450 --- /dev/null +++ b/tests/contracts/test_multisig/wasm/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "test_multisig-wasm" +version = "0.0.0" +edition = "2018" +publish = false +authors = [ "you",] + +[lib] +crate-type = [ "cdylib",] + +[workspace] +members = [ ".",] + +[dev-dependencies] + +[profile.release] +codegen-units = 1 +opt-level = "z" +lto = true +debug = false +panic = "abort" + +[dependencies.test_multisig] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.42.0" diff --git a/tests/contracts/test_multisig/wasm/src/lib.rs b/tests/contracts/test_multisig/wasm/src/lib.rs new file mode 100644 index 00000000..4f7e4a15 --- /dev/null +++ b/tests/contracts/test_multisig/wasm/src/lib.rs @@ -0,0 +1,26 @@ +// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 1 +// Async Callback (empty): 1 +// Total number of exported functions: 3 + +#![no_std] +#![feature(lang_items)] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + test_multisig + ( + init => init + test_change_quorum => test_change_quorum + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/tests/simple/bad-bounds.wast b/tests/simple/bad-bounds.wast index a59918bd..08026b2e 100644 --- a/tests/simple/bad-bounds.wast +++ b/tests/simple/bad-bounds.wast @@ -138,13 +138,13 @@ callTx( , "testContract" , 0, .List , "smallIntGetUnsignedArgumentTest" - , ListItem(Int2Bytes(1, BE, Signed)) ListItem(Int2Bytes(123, BE, Unsigned)) + , ListItemWrap(Int2Bytes(1, BE, Signed)) ListItemWrap(Int2Bytes(123, BE, Unsigned)) , 0 , 0 ) checkExpectStatus(OK) -checkExpectOut(ListItem(Int2Bytes(123, BE, Unsigned))) +checkExpectOut(ListItemWrap(Int2Bytes(123, BE, Unsigned))) ;; pass 1 argument, get 2nd, should fail @@ -153,7 +153,7 @@ callTx( , "testContract" , 0, .List , "smallIntGetUnsignedArgumentTest" - , ListItem(Int2Bytes(1, BE, Signed)) + , ListItemWrap(Int2Bytes(1, BE, Signed)) , 0 , 0 ) @@ -168,7 +168,7 @@ callTx( , "testContract" , 0, .List , "smallIntGetUnsignedArgumentTest" - , ListItem(Int2Bytes(-1, BE, Signed)) ListItem(Int2Bytes(123, BE, Unsigned)) + , ListItemWrap(Int2Bytes(-1, BE, Signed)) ListItemWrap(Int2Bytes(123, BE, Unsigned)) , 0 , 0 ) @@ -183,8 +183,8 @@ callTx( , "testContract" , 0, .List , "smallIntGetUnsignedArgumentTest" - , ListItem(Int2Bytes(1, BE, Signed)) - ListItem(Int2Bytes(maxUInt64 +Int 5, BE, Unsigned)) + , ListItemWrap(Int2Bytes(1, BE, Signed)) + ListItemWrap(Int2Bytes(maxUInt64 +Int 5, BE, Unsigned)) , 0 , 0 ) diff --git a/tests/simple/host-calls.wast b/tests/simple/host-calls.wast index 1e1bfba2..c9b25a62 100644 --- a/tests/simple/host-calls.wast +++ b/tests/simple/host-calls.wast @@ -316,13 +316,13 @@ deployTx( call $bigIntFinishSigned ) ) - , ListItem(Int2Bytes(0, BE, Unsigned)) ListItem(Int2Bytes(32, 2 ^Int 256 -Int 1, BE)) + , ListItemWrap(Int2Bytes(0, BE, Unsigned)) ListItemWrap(Int2Bytes(32, 2 ^Int 256 -Int 1, BE)) , 0 , 0 ) checkExpectStatus(OK) -checkExpectOut(ListItem(Int2Bytes(777, BE, Signed))) +checkExpectOut(ListItemWrap(Int2Bytes(777, BE, Signed))) checkAccountBalance("testDeployer", 0) setAccount("testCaller", 0, 0, .Code, .Bytes, .MapBytesToBytes) @@ -338,7 +338,7 @@ checkExpectStatus(ExecutionFailed) checkExpectMessage(b"invalid argument") callTx( "testCaller" , "testContract" , 0 , .List - , "argsTest_getArgumentLength_invalidArg_oob", ListItem(b"foo") ListItem(b"bar") + , "argsTest_getArgumentLength_invalidArg_oob", ListItemWrap(b"foo") ListItemWrap(b"bar") , 0 , 0 ) @@ -354,7 +354,7 @@ checkExpectStatus(ExecutionFailed) checkExpectMessage(b"invalid argument") callTx( "testCaller" , "testContract" , 0 , .List - , "argsTest_getArgument_invalidArg_oob", ListItem(b"foo") ListItem(b"bar") + , "argsTest_getArgument_invalidArg_oob", ListItemWrap(b"foo") ListItemWrap(b"bar") , 0 , 0 ) diff --git a/vmhooks/baseOps.md b/vmhooks/baseOps.md index 25a66928..d6c81a9b 100644 --- a/vmhooks/baseOps.md +++ b/vmhooks/baseOps.md @@ -9,9 +9,10 @@ require "eei-helpers.md" require "utils.md" module BASEOPS - imports ELROND-CONFIG - imports EEI-HELPERS - imports UTILS + imports ELROND-CONFIG + imports EEI-HELPERS + imports UTILS + imports private LIST-BYTES-EXTENSIONS // extern void getSCAddress(void *context, int32_t resultOffset); rule hostCall("env", "getSCAddress", [ i32 .ValTypes ] -> [ .ValTypes ]) @@ -115,9 +116,11 @@ module BASEOPS andBool definedBytesListLookup(ARGS, IDX) // extern int32_t getArgumentLength(void *context, int32_t id); - rule hostCall("env", "getArgumentLength", [ i32 .ValTypes ] -> [ i32 .ValTypes ]) => i32.const lengthBytes(ARGS[IDX]) ... - 0 |-> IDX - ARGS + rule hostCall("env", "getArgumentLength", [ i32 .ValTypes ] -> [ i32 .ValTypes ]) + => i32.const lengthBytes( ARGS {{ IDX }} ) ... + + 0 |-> IDX:Int + ARGS:ListBytes requires #validArgIdx(IDX, ARGS) rule hostCall("env", "getArgumentLength", [ i32 .ValTypes ] -> [ i32 .ValTypes ]) @@ -129,8 +132,8 @@ module BASEOPS // extern int32_t getArgument(void *context, int32_t id, int32_t argOffset); rule hostCall("env", "getArgument", [ i32 i32 .ValTypes ] -> [ i32 .ValTypes ]) - => #memStore(OFFSET, ARGS[IDX]) - ~> i32.const lengthBytes(ARGS[IDX]) + => #memStore(OFFSET, ARGS {{ IDX }} ) + ~> i32.const lengthBytes( ARGS {{ IDX }} ) ... @@ -383,9 +386,7 @@ module BASEOPS => #executeOnDestContext(Dest, 0, Transfers, GasLimit, Func, Args) ... - Callee requires 0 #executeOnDestContext(Dest, Value, .List, GasLimit, Func, Args) ... - Callee requires 0 hostCall("env", "bigIntGetUnsignedArgument", [ i32 i32 .ValTypes ] -> [ .ValTypes ]) => . ... 0 |-> ARG_IDX 1 |-> BIG_IDX ARGS - HEAP => HEAP [BIG_IDX <- Bytes2Int(ARGS[ARG_IDX], BE, Unsigned)] + HEAP => HEAP [BIG_IDX <- Bytes2Int(ARGS {{ ARG_IDX }}, BE, Unsigned)] requires #validArgIdx(ARG_IDX, ARGS) // If ARG_IDX is invalid (out of bounds) just ignore @@ -372,7 +373,7 @@ module BIGINTOPS rule hostCall("env", "bigIntGetSignedArgument", [ i32 i32 .ValTypes ] -> [ .ValTypes ]) => . ... 0 |-> ARG_IDX 1 |-> BIG_IDX ARGS - HEAP => HEAP [BIG_IDX <- Bytes2Int(ARGS[ARG_IDX], BE, Signed)] + HEAP => HEAP [BIG_IDX <- Bytes2Int(ARGS {{ ARG_IDX }}, BE, Signed)] requires #validArgIdx(ARG_IDX, ARGS) rule hostCall("env", "bigIntGetSignedArgument", [ i32 i32 .ValTypes ] -> [ .ValTypes ]) => . ... diff --git a/vmhooks/manBufOps.md b/vmhooks/manBufOps.md index 78358cbf..7cb54ded 100644 --- a/vmhooks/manBufOps.md +++ b/vmhooks/manBufOps.md @@ -9,9 +9,10 @@ require "bigIntOps.md" require "../data/map-int-to-bytes.k" module MANBUFOPS - imports ELROND-CONFIG - imports BIGINT-HELPERS - imports MAP-INT-TO-BYTES-PRIMITIVE + imports ELROND-CONFIG + imports BIGINT-HELPERS + imports MAP-INT-TO-BYTES-PRIMITIVE + imports LIST-BYTES-EXTENSIONS ``` ## Managed Buffer Internal Instructions @@ -164,7 +165,7 @@ module MANBUFOPS // extern int32_t mBufferGetArgument(void* context, int32_t id, int32_t destinationHandle); rule hostCall("env", "mBufferGetArgument", [ i32 i32 .ValTypes ] -> [ i32 .ValTypes ] ) - => #setBuffer(DEST_IDX, ARGS[ARG_IDX]) + => #setBuffer(DEST_IDX, ARGS {{ ARG_IDX }}) ~> i32 . const 0 ... diff --git a/vmhooks/smallIntOps.md b/vmhooks/smallIntOps.md index fca7be7d..e76fee91 100644 --- a/vmhooks/smallIntOps.md +++ b/vmhooks/smallIntOps.md @@ -14,7 +14,7 @@ module SMALLINTOPS // extern long long smallIntGetUnsignedArgument(void *context, int32_t id); rule [smallIntGetUnsignedArgument]: hostCall("env", "smallIntGetUnsignedArgument", [ i32 .ValTypes ] -> [ i64 .ValTypes ]) - => #returnIfUInt64(Bytes2Int(ARGS[ARG_IDX] orDefault b"", BE, Unsigned), "argument out of range") + => #returnIfUInt64(Bytes2Int(ARGS {{ ARG_IDX }} orDefault b"", BE, Unsigned), "argument out of range") ... 0 |-> ARG_IDX @@ -34,7 +34,7 @@ module SMALLINTOPS // extern long long smallIntGetSignedArgument(void *context, int32_t id); rule [smallIntGetSignedArgument]: hostCall("env", "smallIntGetSignedArgument", [ i32 .ValTypes ] -> [ i64 .ValTypes ]) - => #returnIfSInt64(Bytes2Int(ARGS[ARG_IDX] orDefault b"", BE, Signed), "argument out of range") + => #returnIfSInt64(Bytes2Int(ARGS {{ ARG_IDX }} orDefault b"", BE, Signed), "argument out of range") ... 0 |-> ARG_IDX diff --git a/vmhooks/utils.md b/vmhooks/utils.md index 461dfaf0..4ce36571 100644 --- a/vmhooks/utils.md +++ b/vmhooks/utils.md @@ -2,6 +2,7 @@ # Utils ```k +require "../data/bytes-type.k" require "../data/list-bytes.k" module UTILS @@ -9,7 +10,7 @@ module UTILS imports INT imports LIST imports LIST-BYTES - imports BYTES + imports BYTES-TYPE imports UTILS-CEILS syntax Error ::= Err(String) @@ -32,7 +33,7 @@ module UTILS syntax ListBytesResult ::= BytesResult2ListResult(BytesResult) [function, total] // --------------------------------------------------------------------------------- - rule BytesResult2ListResult(BS:Bytes) => ListItem(BS) + rule BytesResult2ListResult(BS:Bytes) => ListItem(wrap(BS)) rule BytesResult2ListResult(Err(E)) => Err(E) syntax ListResult ::= IntResult2ListResult(IntResult) [function, total]