diff --git a/multiversx_sdk/abi/abi.py b/multiversx_sdk/abi/abi.py index 4fad6a75..8e75b592 100644 --- a/multiversx_sdk/abi/abi.py +++ b/multiversx_sdk/abi/abi.py @@ -21,6 +21,7 @@ from multiversx_sdk.abi.fields import Field from multiversx_sdk.abi.interface import IPayloadHolder from multiversx_sdk.abi.list_value import ListValue +from multiversx_sdk.abi.managed_decimal_value import ManagedDecimalValue from multiversx_sdk.abi.multi_value import MultiValue from multiversx_sdk.abi.option_value import OptionValue from multiversx_sdk.abi.optional_value import OptionalValue @@ -36,6 +37,8 @@ from multiversx_sdk.abi.type_formula_parser import TypeFormulaParser from multiversx_sdk.abi.variadic_values import VariadicValues +from multiversx_sdk.abi.managed_decimal_signed_value import ManagedDecimalSignedValue + class Abi: def __init__(self, definition: AbiDefinition) -> None: @@ -316,6 +319,22 @@ def _create_prototype(self, type_formula: TypeFormula) -> Any: return CountedVariadicValues([], item_creator=lambda: self._create_prototype(type_parameter)) if name == "multi": return MultiValue([self._create_prototype(type_parameter) for type_parameter in type_formula.type_parameters]) + if name == "ManagedDecimal": + scale = type_formula.type_parameters[0].name + + if scale == "usize": + return ManagedDecimalValue(scale=0, is_variable=True) + else: + return ManagedDecimalValue(scale=int(scale), is_variable=False) + + + if name == "ManagedDecimalSigned": + scale = type_formula.type_parameters[0].name + + if scale == "usize": + return ManagedDecimalSignedValue(scale=0, is_variable=True) + else: + return ManagedDecimalSignedValue(scale=int(scale), is_variable=False) # Handle custom types type_prototype = self._get_custom_type_prototype(name) diff --git a/multiversx_sdk/abi/abi_test.py b/multiversx_sdk/abi/abi_test.py index 9474127f..3ae87caa 100644 --- a/multiversx_sdk/abi/abi_test.py +++ b/multiversx_sdk/abi/abi_test.py @@ -1,9 +1,10 @@ +from decimal import Decimal from pathlib import Path from types import SimpleNamespace from typing import Optional from multiversx_sdk.abi.abi import Abi -from multiversx_sdk.abi.abi_definition import ParameterDefinition +from multiversx_sdk.abi.abi_definition import AbiDefinition, ParameterDefinition from multiversx_sdk.abi.address_value import AddressValue from multiversx_sdk.abi.biguint_value import BigUIntValue from multiversx_sdk.abi.bytes_value import BytesValue @@ -19,6 +20,8 @@ from multiversx_sdk.abi.variadic_values import VariadicValues from multiversx_sdk.core.address import Address +from multiversx_sdk.abi.managed_decimal_value import ManagedDecimalValue + testdata = Path(__file__).parent.parent / "testutils" / "testdata" @@ -318,3 +321,74 @@ def test_decode_endpoint_output_parameters_multisig_get_pending_action_full_info Address.from_bech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th").get_public_key(), Address.from_bech32("erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx").get_public_key(), ] + + +def test_managed_decimals(): + abi_definition = AbiDefinition.from_dict({ + "endpoints": [{ + "name": "foo", + "inputs": [ + { + "type": "ManagedDecimal<8>" + }, + { + "type": "ManagedDecimal" + } + ], + "outputs": [] + }] + }) + + abi = Abi(abi_definition) + endpoint = abi.endpoints_prototypes_by_name["foo"] + + first_input = endpoint.input_parameters[0] + second_input = endpoint.input_parameters[1] + + assert isinstance(first_input, ManagedDecimalValue) + assert not first_input.is_variable + assert first_input.scale == 8 + assert first_input.value == Decimal(0) + + assert isinstance(second_input, ManagedDecimalValue) + assert second_input.is_variable + assert second_input.scale == 0 + assert second_input.value == Decimal(0) + + +def test_encode_decode_managed_decimals(): + abi_definition = AbiDefinition.from_dict( + { + "endpoints": [ + { + "name": "dummy", + "inputs": [{"type": "ManagedDecimal<18>"}], + "outputs": [], + }, + { + "name": "foo", + "inputs": [{"name": "x", "type": "ManagedDecimal"}], + "outputs": [{"type": "ManagedDecimalSigned<9>"}], + }, + { + "name": "foobar", + "inputs": [], + "outputs": [{"type": "ManagedDecimal"}], + }, + ] + } + ) + + abi = Abi(abi_definition) + + values = abi.encode_endpoint_input_parameters("dummy", [1]) + assert values[0].hex() == "01" + + values = abi.encode_endpoint_input_parameters("foo", [ManagedDecimalValue(7, 2, True)]) + assert values[0].hex() == "0000000202bc00000002" + + values = abi.decode_endpoint_output_parameters("foo", [bytes.fromhex("07")]) + assert values[0] == Decimal("0.000000007") + + values = abi.decode_endpoint_output_parameters("foobar", [bytes.fromhex("0000000202bc00000002")]) + assert values[0] == Decimal("7") diff --git a/multiversx_sdk/abi/constants.py b/multiversx_sdk/abi/constants.py index 9979c363..7a5000c2 100644 --- a/multiversx_sdk/abi/constants.py +++ b/multiversx_sdk/abi/constants.py @@ -6,3 +6,5 @@ INTEGER_MAX_NUM_BYTES = 64 STRUCT_PACKING_FORMAT_FOR_UINT32 = ">I" ENUM_DISCRIMINANT_FIELD_NAME = "__discriminant__" +U32_SIZE_IN_BYTES = 4 +LOCAL_CONTEXT_PRECISION_FOR_DECIMAL = 256 diff --git a/multiversx_sdk/abi/localnet_integration_test.py b/multiversx_sdk/abi/localnet_integration_test.py new file mode 100644 index 00000000..3db3feed --- /dev/null +++ b/multiversx_sdk/abi/localnet_integration_test.py @@ -0,0 +1,171 @@ +from decimal import Decimal +from pathlib import Path + +import pytest + +from multiversx_sdk.abi.abi import Abi, AbiDefinition +from multiversx_sdk.abi.managed_decimal_value import ManagedDecimalValue +from multiversx_sdk.accounts.account import Account +from multiversx_sdk.network_providers.proxy_network_provider import ProxyNetworkProvider +from multiversx_sdk.smart_contracts.smart_contract_controller import SmartContractController +from multiversx_sdk.testutils.wallets import load_wallets + + +@pytest.mark.skip("Requires localnet") +class TestLocalnetInteraction: + wallets = load_wallets() + alice = wallets["alice"] + testdata = Path(__file__).parent.parent / "testutils" / "testdata" + + def test_managed_decimal(self): + abi_definition = AbiDefinition.from_dict( + { + "endpoints": [ + { + "name": "returns_egld_decimal", + "mutability": "mutable", + "payableInTokens": ["EGLD"], + "inputs": [], + "outputs": [{"type": "ManagedDecimal<18>"}], + }, + { + "name": "managed_decimal_addition", + "mutability": "mutable", + "inputs": [ + {"name": "first", "type": "ManagedDecimal<2>"}, + {"name": "second", "type": "ManagedDecimal<2>"}, + ], + "outputs": [{"type": "ManagedDecimal<2>"}], + }, + { + "name": "managed_decimal_ln", + "mutability": "mutable", + "inputs": [{"name": "x", "type": "ManagedDecimal<9>"}], + "outputs": [{"type": "ManagedDecimalSigned<9>"}], + }, + { + "name": "managed_decimal_addition_var", + "mutability": "mutable", + "inputs": [ + {"name": "first", "type": "ManagedDecimal"}, + {"name": "second", "type": "ManagedDecimal"}, + ], + "outputs": [{"type": "ManagedDecimal"}], + }, + { + "name": "managed_decimal_ln_var", + "mutability": "mutable", + "inputs": [{"name": "x", "type": "ManagedDecimal"}], + "outputs": [{"type": "ManagedDecimalSigned<9>"}], + }, + ] + } + ) + + abi = Abi(abi_definition) + + proxy = ProxyNetworkProvider("http://localhost:7950") + sc_controller = SmartContractController( + chain_id="localnet", + network_provider=proxy, + abi=abi, + ) + + alice = Account(self.alice.secret_key) + alice.nonce = proxy.get_account(alice.address).nonce + + # deploy contract + deploy_tx = sc_controller.create_transaction_for_deploy( + sender=alice, + nonce=alice.get_nonce_then_increment(), + bytecode=self.testdata / "basic-features.wasm", + gas_limit=600_000_000, + arguments=[], + ) + + deploy_tx_hash = proxy.send_transaction(deploy_tx) + deploy_outcome = sc_controller.await_completed_deploy(deploy_tx_hash) + assert deploy_outcome.return_code == "ok" + + contract = deploy_outcome.contracts[0].address + + # return egld decimals + return_egld_transaction = sc_controller.create_transaction_for_execute( + sender=alice, + nonce=alice.get_nonce_then_increment(), + contract=contract, + gas_limit=100_000_000, + function="returns_egld_decimal", + arguments=[], + native_transfer_amount=1, + ) + + tx_hash = proxy.send_transaction(return_egld_transaction) + outcome = sc_controller.await_completed_execute(tx_hash) + assert outcome.return_code == "ok" + assert len(outcome.values) == 1 + assert outcome.values[0] == Decimal("0.000000000000000001") + + # addition with const decimals + addition_transaction = sc_controller.create_transaction_for_execute( + sender=alice, + nonce=alice.get_nonce_then_increment(), + contract=contract, + gas_limit=100_000_000, + function="managed_decimal_addition", + arguments=[ManagedDecimalValue("2.5", 2), ManagedDecimalValue("2.7", 2)], + ) + + tx_hash = proxy.send_transaction(addition_transaction) + outcome = sc_controller.await_completed_execute(tx_hash) + assert outcome.return_code == "ok" + assert len(outcome.values) == 1 + assert outcome.values[0] == Decimal("5.2") + + # log + md_ln_transaction = sc_controller.create_transaction_for_execute( + sender=alice, + nonce=alice.get_nonce_then_increment(), + contract=contract, + gas_limit=100_000_000, + function="managed_decimal_ln", + arguments=[ManagedDecimalValue("23", 9)], + ) + + tx_hash = proxy.send_transaction(md_ln_transaction) + outcome = sc_controller.await_completed_execute(tx_hash) + assert outcome.return_code == "ok" + assert len(outcome.values) == 1 + assert outcome.values[0] == Decimal("3.135553845") + + # addition var decimals + addition_var_transaction = sc_controller.create_transaction_for_execute( + sender=alice, + nonce=alice.get_nonce_then_increment(), + contract=contract, + gas_limit=50_000_000, + function="managed_decimal_addition_var", + arguments=[ManagedDecimalValue("4", 2, True), ManagedDecimalValue("5", 2, True)], + ) + + tx_hash = proxy.send_transaction(addition_var_transaction) + outcome = sc_controller.await_completed_execute(tx_hash) + assert outcome.return_code == "ok" + assert len(outcome.values) == 1 + assert outcome.values[0] == Decimal("9") + + # ln var + ln_var_transaction = sc_controller.create_transaction_for_execute( + sender=alice, + nonce=alice.get_nonce_then_increment(), + contract=contract, + gas_limit=50_000_000, + function="managed_decimal_ln_var", + arguments=[ManagedDecimalValue("23", 9, True)], + ) + + tx_hash = proxy.send_transaction(ln_var_transaction) + outcome = sc_controller.await_completed_execute(tx_hash) + assert outcome.return_code == "ok" + assert len(outcome.values) == 1 + assert outcome.values[0] == Decimal("3.135553845") diff --git a/multiversx_sdk/abi/managed_decimal_signed_value.py b/multiversx_sdk/abi/managed_decimal_signed_value.py new file mode 100644 index 00000000..33d03494 --- /dev/null +++ b/multiversx_sdk/abi/managed_decimal_signed_value.py @@ -0,0 +1,98 @@ +import io +from decimal import Decimal, localcontext +from typing import Any, Union + +from multiversx_sdk.abi.bigint_value import BigIntValue +from multiversx_sdk.abi.constants import U32_SIZE_IN_BYTES, LOCAL_CONTEXT_PRECISION_FOR_DECIMAL +from multiversx_sdk.abi.shared import read_bytes_exactly +from multiversx_sdk.abi.small_int_values import U32Value + + +class ManagedDecimalSignedValue: + def __init__(self, value: Union[int, str] = 0, scale: int = 0, is_variable: bool = False): + self.value = Decimal(value) + self.scale = scale + self.is_variable = is_variable + + def set_payload(self, value: Any): + if isinstance(value, ManagedDecimalSignedValue): + if self.is_variable != value.is_variable: + raise Exception("Cannot set payload! Both managed decimal values should be variable.") + + self.value = value.value + + if self.is_variable: + self.scale = value.scale + else: + self.value = self._convert_to_decimal(value) + + def get_payload(self) -> Decimal: + return self.value + + def encode_top_level(self, writer: io.BytesIO): + self.encode_nested(writer) + + def encode_nested(self, writer: io.BytesIO): + raw_value = BigIntValue(self._convert_value_to_int()) + if self.is_variable: + raw_value.encode_nested(writer) + U32Value(self.scale).encode_nested(writer) + else: + raw_value.encode_top_level(writer) + + def decode_top_level(self, data: bytes): + if not data: + self.value = Decimal(0) + self.scale = 0 + return + + value = BigIntValue() + scale = U32Value() + + if self.is_variable: + # read biguint value length in bytes + value_length = self._unsigned_from_bytes(data[:U32_SIZE_IN_BYTES]) + + # remove biguint length; data is only biguint value and scale + data = data[U32_SIZE_IN_BYTES:] + + # read biguint value + value.decode_top_level(data[:value_length]) + + # remove biguintvalue; data contains only scale + data = data[value_length:] + + # read scale + scale.decode_top_level(data) + self.scale = scale.get_payload() + else: + value.decode_top_level(data) + + self.value = self._convert_to_decimal(value.get_payload()) + + def decode_nested(self, reader: io.BytesIO): + length = self._unsigned_from_bytes(read_bytes_exactly(reader, U32_SIZE_IN_BYTES)) + payload = read_bytes_exactly(reader, length) + self.decode_top_level(payload) + + def get_precision(self) -> int: + value_str = f"{self.value:.{self.scale}f}" + return len(value_str.replace(".", "")) + + def _unsigned_from_bytes(self, data: bytes) -> int: + return int.from_bytes(data, byteorder="big", signed=False) + + def _convert_value_to_int(self) -> int: + with localcontext() as ctx: + ctx.prec = LOCAL_CONTEXT_PRECISION_FOR_DECIMAL + return int(self.value.scaleb(self.scale)) + + def _convert_to_decimal(self, value: Union[int, str]) -> Decimal: + with localcontext() as ctx: + ctx.prec = LOCAL_CONTEXT_PRECISION_FOR_DECIMAL + return Decimal(value) / (10**self.scale) + + def __eq__(self, other: object) -> bool: + if not isinstance(other, ManagedDecimalSignedValue): + return False + return self.value == other.value and self.scale == other.scale diff --git a/multiversx_sdk/abi/managed_decimal_value.py b/multiversx_sdk/abi/managed_decimal_value.py new file mode 100644 index 00000000..81d877db --- /dev/null +++ b/multiversx_sdk/abi/managed_decimal_value.py @@ -0,0 +1,98 @@ +import io +from decimal import Decimal, localcontext +from typing import Any, Union + +from multiversx_sdk.abi.biguint_value import BigUIntValue +from multiversx_sdk.abi.constants import U32_SIZE_IN_BYTES, LOCAL_CONTEXT_PRECISION_FOR_DECIMAL +from multiversx_sdk.abi.shared import read_bytes_exactly +from multiversx_sdk.abi.small_int_values import U32Value + + +class ManagedDecimalValue: + def __init__(self, value: Union[int, str] = 0, scale: int = 0, is_variable: bool = False): + self.value = Decimal(value) + self.scale = scale + self.is_variable = is_variable + + def set_payload(self, value: Any): + if isinstance(value, ManagedDecimalValue): + if self.is_variable != value.is_variable: + raise Exception("Cannot set payload! Both managed decimal values should be variable.") + + self.value = value.value + + if self.is_variable: + self.scale = value.scale + else: + self.value = self._convert_to_decimal(value) + + def get_payload(self) -> Decimal: + return self.value + + def encode_top_level(self, writer: io.BytesIO): + self.encode_nested(writer) + + def encode_nested(self, writer: io.BytesIO): + raw_value = BigUIntValue(self._convert_value_to_int()) + if self.is_variable: + raw_value.encode_nested(writer) + U32Value(self.scale).encode_nested(writer) + else: + raw_value.encode_top_level(writer) + + def decode_top_level(self, data: bytes): + if not data: + self.value = Decimal(0) + self.scale = 0 + return + + value = BigUIntValue() + scale = U32Value() + + if self.is_variable: + # read biguint value length in bytes + value_length = self._unsigned_from_bytes(data[:U32_SIZE_IN_BYTES]) + + # remove biguint length; data is only biguint value and scale + data = data[U32_SIZE_IN_BYTES:] + + # read biguint value + value.decode_top_level(data[:value_length]) + + # remove biguintvalue; data contains only scale + data = data[value_length:] + + # read scale + scale.decode_top_level(data) + self.scale = scale.get_payload() + else: + value.decode_top_level(data) + + self.value = self._convert_to_decimal(value.get_payload()) + + def decode_nested(self, reader: io.BytesIO): + length = self._unsigned_from_bytes(read_bytes_exactly(reader, U32_SIZE_IN_BYTES)) + payload = read_bytes_exactly(reader, length) + self.decode_top_level(payload) + + def get_precision(self) -> int: + value_str = f"{self.value:.{self.scale}f}" + return len(value_str.replace(".", "")) + + def _unsigned_from_bytes(self, data: bytes) -> int: + return int.from_bytes(data, byteorder="big", signed=False) + + def _convert_value_to_int(self) -> int: + with localcontext() as ctx: + ctx.prec = LOCAL_CONTEXT_PRECISION_FOR_DECIMAL + return int(self.value.scaleb(self.scale)) + + def _convert_to_decimal(self, value: Union[int, str]) -> Decimal: + with localcontext() as ctx: + ctx.prec = LOCAL_CONTEXT_PRECISION_FOR_DECIMAL + return Decimal(value) / (10**self.scale) + + def __eq__(self, other: object) -> bool: + if not isinstance(other, ManagedDecimalValue): + return False + return self.value == other.value and self.scale == other.scale diff --git a/multiversx_sdk/abi/managed_decimal_value_test.py b/multiversx_sdk/abi/managed_decimal_value_test.py new file mode 100644 index 00000000..c99af050 --- /dev/null +++ b/multiversx_sdk/abi/managed_decimal_value_test.py @@ -0,0 +1,81 @@ +from decimal import Decimal + +from multiversx_sdk.abi.managed_decimal_value import ManagedDecimalValue +from multiversx_sdk.abi.managed_decimal_signed_value import ManagedDecimalSignedValue + + +class TestManagedDecimalValueTest: + + def test_expected_values(self): + value = ManagedDecimalValue(1, 2) + assert not value.is_variable + assert value.get_precision() == 3 + assert value.get_payload() == Decimal(1) + + value = ManagedDecimalValue("1.234", 3) + assert value.get_precision() == 4 + assert value.get_payload() == Decimal("1.234") + + value = ManagedDecimalValue("1.3", 2) + assert value.get_precision() == 3 + assert value.get_payload() == Decimal("1.3") + + value = ManagedDecimalValue(13, 2) + assert value.get_precision() == 4 + assert value.get_payload() == Decimal(13) + + value = ManagedDecimalValue("2.7", 2) + assert value.get_precision() == 3 + assert value.get_payload() == Decimal("2.7") + + value = ManagedDecimalValue(value="0.000000000000000001", scale=18) + assert value.get_precision() == 19 + assert value.get_payload() == Decimal("0.000000000000000001") + + def test_compare_values(self): + value = ManagedDecimalValue(1, 2) + + assert value != ManagedDecimalValue(2, 2) + assert value != ManagedDecimalValue(1, 3) + assert value == ManagedDecimalValue(1, 2) + + +class TestManagedDecimalSignedValueTest: + + def test_expected_values(self): + value = ManagedDecimalSignedValue(1, 2) + assert not value.is_variable + assert value.get_precision() == 3 + assert value.get_payload() == Decimal(1) + + value = ManagedDecimalSignedValue(-1, 2) + assert not value.is_variable + assert value.get_precision() == 4 + assert value.get_payload() == Decimal(-1) + + value = ManagedDecimalSignedValue("1.234", 3) + assert value.get_precision() == 4 + assert value.get_payload() == Decimal("1.234") + + value = ManagedDecimalSignedValue("1.3", 2) + assert value.get_precision() == 3 + assert value.get_payload() == Decimal("1.3") + + value = ManagedDecimalSignedValue(13, 2) + assert value.get_precision() == 4 + assert value.get_payload() == Decimal(13) + + value = ManagedDecimalSignedValue("2.7", 2) + assert value.get_precision() == 3 + assert value.get_payload() == Decimal("2.7") + + value = ManagedDecimalSignedValue(value="0.000000000000000001", scale=18) + assert value.get_precision() == 19 + assert value.get_payload() == Decimal("0.000000000000000001") + + def test_compare_values(self): + value = ManagedDecimalSignedValue(1, 2) + + assert value != ManagedDecimalSignedValue(2, 2) + assert value != ManagedDecimalSignedValue(1, 3) + assert value == ManagedDecimalSignedValue(1, 2) diff --git a/multiversx_sdk/smart_contracts/smart_contract_controller.py b/multiversx_sdk/smart_contracts/smart_contract_controller.py index 54fc93c0..9b26ca19 100644 --- a/multiversx_sdk/smart_contracts/smart_contract_controller.py +++ b/multiversx_sdk/smart_contracts/smart_contract_controller.py @@ -47,7 +47,7 @@ class SmartContractController(BaseController): def __init__(self, chain_id: str, network_provider: INetworkProvider, abi: Optional[Abi] = None) -> None: self.abi = abi self.factory = SmartContractTransactionsFactory(TransactionsFactoryConfig(chain_id), abi=self.abi) - self.parser = SmartContractTransactionsOutcomeParser() + self.parser = SmartContractTransactionsOutcomeParser(abi=self.abi) self.network_provider = network_provider self.serializer = Serializer() diff --git a/multiversx_sdk/testutils/testdata/basic-features.abi.json b/multiversx_sdk/testutils/testdata/basic-features.abi.json new file mode 100644 index 00000000..733da10f --- /dev/null +++ b/multiversx_sdk/testutils/testdata/basic-features.abi.json @@ -0,0 +1,6200 @@ +{ + "buildInfo": { + "rustc": { + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", + "channel": "Stable", + "short": "rustc 1.80.0 (051478957 2024-07-21)" + }, + "contractCrate": { + "name": "basic-features", + "version": "0.0.0", + "gitVersion": "v0.53.0-3-g49a82cb19" + }, + "framework": { + "name": "multiversx-sc", + "version": "0.53.0" + } + }, + "name": "BasicFeatures", + "constructor": { + "inputs": [], + "outputs": [] + }, + "endpoints": [ + { + "name": "panicWithMessage", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "docs": [ + "Operation that has caused issues in the past" + ], + "name": "count_ones", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "u64" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "endpoint_with_mutable_arg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg1", + "type": "BigUint" + }, + { + "name": "arg2", + "type": "u64" + }, + { + "name": "arg3", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sqrt_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sqrt_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "log2_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "log2_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "pow_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "pow_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "pow_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "pow_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_to_u64", + "mutability": "mutable", + "inputs": [ + { + "name": "bu", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "biguint_overwrite_u64", + "mutability": "mutable", + "inputs": [ + { + "name": "bu", + "type": "BigUint" + }, + { + "name": "small", + "type": "u64" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_zero", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_from_u64_1", + "mutability": "mutable", + "inputs": [ + { + "name": "small", + "type": "u64" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_from_u64_2", + "mutability": "mutable", + "inputs": [ + { + "name": "small", + "type": "u64" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "biguint_from_u128", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_from_managed_buffer", + "mutability": "mutable", + "inputs": [ + { + "name": "mb", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_uint_from_managed_buffer_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "mb", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "big_int_zero", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "big_int_from_i64_1", + "mutability": "mutable", + "inputs": [ + { + "name": "small", + "type": "i64" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "big_int_from_i64_2", + "mutability": "mutable", + "inputs": [ + { + "name": "small", + "type": "i64" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "big_uint_eq_u64", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigUint" + }, + { + "name": "small", + "type": "u64" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "big_int_to_i64", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "bigint_overwrite_i64", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigInt" + }, + { + "name": "small", + "type": "i64" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_int_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_uint_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_int_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_uint_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "add_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sub_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "sub_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "sub_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sub_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "mul_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "mul_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "mul_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "mul_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "div_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "div_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "div_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "div_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "rem_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "rem_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "rem_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "rem_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "add_assign_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_assign_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "add_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "add_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sub_assign_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "sub_assign_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "sub_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "sub_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "mul_assign_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "mul_assign_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "mul_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "mul_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "div_assign_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "div_assign_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "div_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "div_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "rem_assign_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "rem_assign_big_int_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigInt" + }, + { + "name": "b", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "rem_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "rem_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_and_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_and_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_or_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_or_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_xor_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_xor_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_and_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_and_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_or_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_or_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_xor_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "bit_xor_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shr_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shr_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shl_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shl_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shr_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shr_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shl_assign_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "shl_assign_big_uint_ref", + "mutability": "mutable", + "inputs": [ + { + "name": "a", + "type": "BigUint" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "get_block_timestamp", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_block_nonce", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_block_round", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_block_epoch", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_block_random_seed", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "array48" + } + ] + }, + { + "name": "get_prev_block_timestamp", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_prev_block_nonce", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_prev_block_round", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_prev_block_epoch", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_prev_block_random_seed", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "array48" + } + ] + }, + { + "name": "get_caller", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "get_owner_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "get_shard_of_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "is_smart_contract", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "get_state_root_hash", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "array32" + } + ] + }, + { + "name": "get_tx_hash", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "array32" + } + ] + }, + { + "name": "get_gas_left", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "get_cumulated_validator_rewards", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "get_code_metadata", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "CodeMetadata" + } + ] + }, + { + "name": "is_builtin_function", + "mutability": "mutable", + "inputs": [ + { + "name": "function_name", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "codec_err_finish", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CodecErrorTestType" + } + ] + }, + { + "name": "codec_err_storage_key", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "codec_err_storage_get", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "CodecErrorTestType" + } + ] + }, + { + "name": "codec_err_storage_set", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "codec_err_event_topic", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "codec_err_event_data", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "docs": [ + "Never actually calls any deploy/upgrade, so it is appropriate in this contract.", + "It just covers contract init serialization errors." + ], + "name": "codec_err_contract_init", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "docs": [ + "Never actually calls any async/sync call, so it is appropriate in this contract.", + "It just covers contract call serialization errors." + ], + "name": "codec_err_contract_call", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "compute_sha256", + "mutability": "mutable", + "inputs": [ + { + "name": "input", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "array32" + } + ] + }, + { + "name": "compute_keccak256", + "mutability": "mutable", + "inputs": [ + { + "name": "input", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "array32" + } + ] + }, + { + "name": "compute_ripemd160", + "mutability": "mutable", + "inputs": [ + { + "name": "input", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "array20" + } + ] + }, + { + "name": "verify_bls_signature", + "mutability": "mutable", + "inputs": [ + { + "name": "key", + "type": "bytes" + }, + { + "name": "message", + "type": "bytes" + }, + { + "name": "signature", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "verify_ed25519_signature", + "mutability": "mutable", + "inputs": [ + { + "name": "key", + "type": "bytes" + }, + { + "name": "message", + "type": "bytes" + }, + { + "name": "signature", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "verify_secp256k1_signature", + "mutability": "mutable", + "inputs": [ + { + "name": "key", + "type": "bytes" + }, + { + "name": "message", + "type": "bytes" + }, + { + "name": "signature", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "compute_secp256k1_der_signature", + "mutability": "mutable", + "inputs": [ + { + "name": "r", + "type": "bytes" + }, + { + "name": "s", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "echo_u64", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u64" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "echo_i64", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i64" + } + ], + "outputs": [ + { + "type": "i64" + } + ] + }, + { + "name": "echo_i32", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i32" + } + ], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "echo_u32", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "echo_isize", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i32" + } + ], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "echo_usize", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "echo_i8", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i8" + } + ], + "outputs": [ + { + "type": "i8" + } + ] + }, + { + "name": "echo_u8", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u8" + } + ], + "outputs": [ + { + "type": "u8" + } + ] + }, + { + "name": "echo_bool", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "bool" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "echo_opt_bool", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "Option" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "echo_multi_value_u32", + "mutability": "mutable", + "inputs": [ + { + "name": "m", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "u32" + }, + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "echo_multi_value_tuples", + "mutability": "mutable", + "inputs": [ + { + "name": "m", + "type": "variadic>", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "variadic>", + "multi_result": true + } + ] + }, + { + "name": "echo_ser_example_2", + "mutability": "mutable", + "inputs": [ + { + "name": "se", + "type": "ExampleEnumWithFields" + } + ], + "outputs": [ + { + "type": "ExampleEnumWithFields" + } + ] + }, + { + "name": "echo_simple_enum", + "mutability": "readonly", + "inputs": [ + { + "name": "se", + "type": "ExampleEnumSimple" + } + ], + "outputs": [ + { + "type": "ExampleEnumSimple" + } + ] + }, + { + "name": "finish_simple_enum_variant_1", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "ExampleEnumSimple" + } + ] + }, + { + "name": "echo_arrayvec", + "mutability": "readonly", + "inputs": [ + { + "name": "av", + "type": "List" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "echo_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "echo_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "echo_managed_buffer", + "mutability": "mutable", + "inputs": [ + { + "name": "mb", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "echo_managed_address", + "mutability": "mutable", + "inputs": [ + { + "name": "ma", + "type": "Address" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "docs": [ + "This tests that nested serialization of big ints within unmanaged types works." + ], + "name": "echo_big_int_managed_vec", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "List" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "docs": [ + "This tests that nested serialization of big ints within unmanaged types works." + ], + "name": "echo_big_int_tuple", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "tuple" + } + ], + "outputs": [ + { + "type": "tuple" + } + ] + }, + { + "docs": [ + "This tests that nested serialization of big ints within unmanaged types works." + ], + "name": "echo_big_int_option", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "Option" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "echo_tuple_into_multiresult", + "mutability": "mutable", + "inputs": [ + { + "name": "addr", + "type": "Address" + }, + { + "name": "vec", + "type": "List" + } + ], + "outputs": [ + { + "type": "Address" + }, + { + "type": "List" + } + ] + }, + { + "name": "echo_managed_vec_of_managed_vec", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List>" + } + ], + "outputs": [ + { + "type": "List>" + } + ] + }, + { + "name": "echo_managed_vec_of_token_identifier", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "echo_varags_managed_eager", + "mutability": "mutable", + "inputs": [ + { + "name": "m", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "u32" + }, + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "echo_varags_managed_sum", + "mutability": "mutable", + "inputs": [ + { + "name": "m", + "type": "variadic>", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "variadic>", + "multi_result": true + } + ] + }, + { + "name": "compute_get_values", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + } + ], + "outputs": [ + { + "type": "tuple" + } + ] + }, + { + "name": "compute_create_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "tuple" + } + ] + }, + { + "name": "compute_get_ec_length", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "compute_get_priv_key_byte_length", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "compute_ec_add", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_first_point", + "type": "BigUint" + }, + { + "name": "y_first_point", + "type": "BigUint" + }, + { + "name": "x_second_point", + "type": "BigUint" + }, + { + "name": "y_second_point", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_ec_double", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_point", + "type": "BigUint" + }, + { + "name": "y_point", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_is_on_curve_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_point", + "type": "BigUint" + }, + { + "name": "y_point", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "compute_scalar_mult", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_point", + "type": "BigUint" + }, + { + "name": "y_point", + "type": "BigUint" + }, + { + "name": "data", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_scalar_base_mult", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "data", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_marshal_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_pair", + "type": "BigUint" + }, + { + "name": "y_pair", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "compute_marshal_compressed_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "x_pair", + "type": "BigUint" + }, + { + "name": "y_pair", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "compute_unmarshal_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "data", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_unmarshal_compressed_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + }, + { + "name": "data", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "compute_generate_key_ec", + "mutability": "mutable", + "inputs": [ + { + "name": "curve_bitsize", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + }, + { + "type": "BigUint" + }, + { + "type": "bytes" + } + ] + }, + { + "name": "logEventA", + "mutability": "mutable", + "inputs": [ + { + "name": "data", + "type": "u32" + } + ], + "outputs": [] + }, + { + "docs": [ + "Logs `event_a` a repeated number of times." + ], + "name": "logEventARepeat", + "mutability": "mutable", + "inputs": [ + { + "name": "num_logs", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "logEventB", + "mutability": "mutable", + "inputs": [ + { + "name": "arg1", + "type": "BigUint" + }, + { + "name": "arg2", + "type": "Address" + }, + { + "name": "data", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [] + }, + { + "name": "only_owner_endpoint", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "only_user_account_endpoint", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "require_equals", + "mutability": "readonly", + "inputs": [ + { + "name": "a", + "type": "u32" + }, + { + "name": "b", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "sc_panic", + "mutability": "readonly", + "inputs": [], + "outputs": [] + }, + { + "name": "maddress_from_array", + "mutability": "mutable", + "inputs": [ + { + "name": "array", + "type": "array32" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "maddress_from_managed_buffer", + "mutability": "mutable", + "inputs": [ + { + "name": "managed_buffer", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "mbuffer_new", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "mbuffer_concat", + "mutability": "mutable", + "inputs": [ + { + "name": "mb1", + "type": "bytes" + }, + { + "name": "mb2", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "mbuffer_copy_slice", + "mutability": "mutable", + "inputs": [ + { + "name": "mb", + "type": "bytes" + }, + { + "name": "starting_position", + "type": "u32" + }, + { + "name": "slice_len", + "type": "u32" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "mbuffer_set_random", + "mutability": "mutable", + "inputs": [ + { + "name": "nr_bytes", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "mbuffer_eq", + "mutability": "mutable", + "inputs": [ + { + "name": "mb1", + "type": "bytes" + }, + { + "name": "mb2", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_address_zero", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "managed_address_eq", + "mutability": "mutable", + "inputs": [ + { + "name": "mb1", + "type": "Address" + }, + { + "name": "mb2", + "type": "Address" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_vec_new", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "managed_vec_biguint_push", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "item", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "managed_vec_biguint_eq", + "mutability": "mutable", + "inputs": [ + { + "name": "mv1", + "type": "List" + }, + { + "name": "mv2", + "type": "List" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_vec_address_push", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List
" + }, + { + "name": "item", + "type": "Address" + } + ], + "outputs": [ + { + "type": "List
" + } + ] + }, + { + "name": "managed_vec_set", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "item", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "managed_vec_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "managed_vec_find", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "item", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "managed_vec_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "item", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_ref_explicit", + "mutability": "mutable", + "inputs": [ + { + "name": "mv", + "type": "List" + }, + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "storage_read_raw", + "mutability": "mutable", + "inputs": [ + { + "name": "storage_key", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "storage_write_raw", + "mutability": "mutable", + "inputs": [ + { + "name": "storage_key", + "type": "bytes" + }, + { + "name": "value", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "storage_read_from_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "storage_key", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "load_bytes", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "load_big_uint", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "load_big_int", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "load_u64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "load_usize", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "load_i64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i64" + } + ] + }, + { + "name": "load_bool", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "load_addr", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "load_opt_addr", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional
", + "multi_result": true + } + ] + }, + { + "name": "is_empty_opt_addr", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "get_nr_to_clear", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "clear_storage_value", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "load_ser_2", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "ExampleEnumWithFields" + } + ] + }, + { + "name": "load_map1", + "mutability": "mutable", + "inputs": [ + { + "name": "addr", + "type": "Address" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "load_map2", + "mutability": "mutable", + "inputs": [ + { + "name": "addr1", + "type": "Address" + }, + { + "name": "addr2", + "type": "Address" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "load_map3", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "load_from_address_raw", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "key", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "store_bytes", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "store_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "store_big_int", + "mutability": "mutable", + "inputs": [ + { + "name": "bi", + "type": "BigInt" + } + ], + "outputs": [] + }, + { + "name": "store_usize", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "store_i32", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i32" + } + ], + "outputs": [] + }, + { + "name": "store_u64", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "u64" + } + ], + "outputs": [] + }, + { + "name": "store_i64", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i64" + } + ], + "outputs": [] + }, + { + "name": "store_bool", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "bool" + } + ], + "outputs": [] + }, + { + "name": "store_addr", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "store_opt_addr", + "mutability": "mutable", + "inputs": [ + { + "name": "opt_addr", + "type": "optional
", + "multi_arg": true + } + ], + "outputs": [] + }, + { + "name": "store_ser_2", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "ExampleEnumWithFields" + } + ], + "outputs": [] + }, + { + "name": "store_map1", + "mutability": "mutable", + "inputs": [ + { + "name": "addr", + "type": "Address" + }, + { + "name": "bi", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "store_map2", + "mutability": "mutable", + "inputs": [ + { + "name": "addr1", + "type": "Address" + }, + { + "name": "addr2", + "type": "Address" + }, + { + "name": "bi", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "store_map3", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "u32" + }, + { + "name": "b", + "type": "bool" + } + ], + "outputs": [] + }, + { + "name": "store_reserved_i64", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "i64" + } + ], + "outputs": [] + }, + { + "name": "store_reserved_big_uint", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "store_reserved_vec_u8", + "mutability": "mutable", + "inputs": [ + { + "name": "i", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "address_to_id_mapper_get_id", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "address_to_id_mapper_get_id_non_zero", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "address_to_id_mapper_get_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address_id", + "type": "u64" + } + ], + "outputs": [ + { + "type": "Option
" + } + ] + }, + { + "name": "address_to_id_mapper_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "address_id", + "type": "u64" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "address_to_id_mapper_set", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "address_to_id_mapper_get_id_or_insert", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "address_to_id_mapper_remove_by_id", + "mutability": "mutable", + "inputs": [ + { + "name": "address_id", + "type": "u64" + } + ], + "outputs": [ + { + "type": "Option
" + } + ] + }, + { + "name": "address_to_id_mapper_remove_by_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "getListMapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "listMapperPushBack", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "listMapperPushFront", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "listMapperPopFront", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperPopBack", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperFront", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperBack", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperPushAfter", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + }, + { + "name": "element", + "type": "u32" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperPushBefore", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + }, + { + "name": "element", + "type": "u32" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperRemoveNode", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "listMapperRemoveNodeById", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "listMapperSetValue", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + }, + { + "name": "new_value", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "listMapperSetValueById", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + }, + { + "name": "new_value", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "listMapperIterateByHand", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + } + ], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "listMapperIterateByIter", + "mutability": "mutable", + "inputs": [ + { + "name": "node_id", + "type": "u32" + } + ], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "queue_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "queue_mapper_push_back", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "queue_mapper_pop_front", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "queue_mapper_front", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic>", + "multi_result": true + } + ] + }, + { + "name": "map_mapper_keys", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "map_mapper_values", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "map_mapper_insert", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "value", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "map_mapper_contains_key", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "map_mapper_get", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "map_mapper_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "map_mapper_entry_or_default_update_increment", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "increment", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_mapper_entry_or_insert_default", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "default", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_mapper_entry_and_modify", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "increment", + "type": "u32" + }, + { + "name": "otherwise", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_mapper_entry_or_insert_with_key", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key_increment", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_storage_mapper_view", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "map_storage_mapper_insert_default", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "map_storage_mapper_contains_key", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "map_storage_mapper_get", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "map_storage_mapper_insert_value", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key", + "type": "u32" + }, + { + "name": "value", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "map_storage_mapper_get_value", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "map_storage_mapper_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "map_storage_mapper_clear", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "map_storage_mapper_entry_or_default_update_increment", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key", + "type": "u32" + }, + { + "name": "increment", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_storage_mapper_entry_and_modify_increment_or_default", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key", + "type": "u32" + }, + { + "name": "value", + "type": "u32" + }, + { + "name": "other", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_storage_mapper_entry_or_default_update", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + }, + { + "name": "key", + "type": "u32" + }, + { + "name": "value", + "type": "u32" + } + ], + "outputs": [ + { + "type": "Option" + } + ] + }, + { + "name": "set_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "set_mapper_insert", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "set_mapper_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "set_mapper_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "set_mapper_front", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "set_mapper_back", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "set_mapper_next", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "set_mapper_previous", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "set_mapper_iter_from_and_count", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "map_my_single_value_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "my_single_value_mapper_increment_1", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigInt" + } + ], + "outputs": [] + }, + { + "docs": [ + "Same as my_single_value_mapper_increment_1, but expressed more compactly." + ], + "name": "my_single_value_mapper_increment_2", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigInt" + } + ], + "outputs": [] + }, + { + "name": "my_single_value_mapper_subtract_with_require", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigInt" + } + ], + "outputs": [] + }, + { + "name": "my_single_value_mapper_set_if_empty", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigInt" + } + ], + "outputs": [] + }, + { + "name": "clear_single_value_mapper", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "get_from_address_single_value_mapper", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "is_empty_single_value_mapper", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "is_empty_at_address_single_value_mapper", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "raw_byte_length_single_value_mapper", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "set_single_value_mapper_with_key", + "mutability": "mutable", + "inputs": [ + { + "name": "key", + "type": "u32" + }, + { + "name": "value", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "vec_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "vec_mapper_push", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "vec_mapper_get", + "mutability": "readonly", + "inputs": [ + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "vec_mapper_get_at_address", + "mutability": "readonly", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "vec_mapper_len", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "vec_mapper_len_at_address", + "mutability": "readonly", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "token_attributes_set", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "attributes", + "type": "TokenAttributesStruct" + } + ], + "outputs": [] + }, + { + "name": "token_attributes_update", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "attributes", + "type": "TokenAttributesStruct" + } + ], + "outputs": [] + }, + { + "name": "token_attributes_get_attributes", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + } + ], + "outputs": [ + { + "type": "TokenAttributesStruct" + } + ] + }, + { + "name": "token_attributes_get_nonce", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "attributes", + "type": "TokenAttributesStruct" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "token_attributes_clear", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + } + ], + "outputs": [] + }, + { + "name": "token_attributes_has_attributes", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "add_to_whitelist", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "remove_from_whitelist", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "check_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "check_contains_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "require_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "require_contains_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "item", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "issue_fungible_default_callback", + "mutability": "mutable", + "payableInTokens": [ + "EGLD" + ], + "inputs": [ + { + "name": "token_ticker", + "type": "bytes" + }, + { + "name": "initial_supply", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "issue_fungible_custom_callback", + "mutability": "mutable", + "payableInTokens": [ + "EGLD" + ], + "inputs": [ + { + "name": "token_ticker", + "type": "bytes" + }, + { + "name": "initial_supply", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "issue_and_set_all_roles_fungible", + "mutability": "mutable", + "payableInTokens": [ + "EGLD" + ], + "inputs": [ + { + "name": "token_ticker", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "set_local_roles_fungible", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "mint_fungible", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "mint_and_send_fungible", + "mutability": "mutable", + "inputs": [ + { + "name": "to", + "type": "Address" + }, + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "burn_fungible", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "get_balance_fungible", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "require_same_token_fungible", + "mutability": "mutable", + "payableInTokens": [ + "*" + ], + "inputs": [], + "outputs": [] + }, + { + "name": "require_all_same_token_fungible", + "mutability": "mutable", + "payableInTokens": [ + "*" + ], + "inputs": [], + "outputs": [] + }, + { + "name": "getFungibleTokenId", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "TokenIdentifier" + } + ] + }, + { + "name": "issue_and_set_all_roles_meta", + "mutability": "mutable", + "payableInTokens": [ + "EGLD" + ], + "inputs": [ + { + "name": "token_ticker", + "type": "bytes" + } + ], + "outputs": [] + }, + { + "name": "mapper_nft_set_token_id", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "TokenIdentifier" + } + ], + "outputs": [] + }, + { + "name": "mapper_nft_create", + "mutability": "mutable", + "inputs": [ + { + "name": "amount", + "type": "BigUint" + }, + { + "name": "attributes", + "type": "RgbColor" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "mapper_nft_create_and_send", + "mutability": "mutable", + "inputs": [ + { + "name": "to", + "type": "Address" + }, + { + "name": "amount", + "type": "BigUint" + }, + { + "name": "attributes", + "type": "RgbColor" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "mapper_nft_add_quantity", + "mutability": "mutable", + "inputs": [ + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "mapper_nft_add_quantity_and_send", + "mutability": "mutable", + "inputs": [ + { + "name": "to", + "type": "Address" + }, + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "EsdtTokenPayment" + } + ] + }, + { + "name": "mapper_nft_burn", + "mutability": "mutable", + "inputs": [ + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "amount", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "mapper_nft_get_balance", + "mutability": "mutable", + "inputs": [ + { + "name": "token_nonce", + "type": "u64" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "mapper_get_token_attributes", + "mutability": "mutable", + "inputs": [ + { + "name": "token_nonce", + "type": "u64" + } + ], + "outputs": [ + { + "type": "RgbColor" + } + ] + }, + { + "name": "getNonFungibleTokenId", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "TokenIdentifier" + } + ] + }, + { + "name": "init_unique_id_mapper", + "mutability": "mutable", + "inputs": [ + { + "name": "len", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "unique_id_mapper_get", + "mutability": "mutable", + "inputs": [ + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "unique_id_mapper_swap_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "unique_id_mapper_set", + "mutability": "mutable", + "inputs": [ + { + "name": "index", + "type": "u32" + }, + { + "name": "id", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "unique_id_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "unordered_set_mapper", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "variadic", + "multi_result": true + } + ] + }, + { + "name": "unordered_set_mapper_insert", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "unordered_set_mapper_contains", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "unordered_set_mapper_remove", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_struct_eq", + "mutability": "mutable", + "inputs": [ + { + "name": "s1", + "type": "ExampleStructManaged" + }, + { + "name": "s2", + "type": "ExampleStructManaged" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "no_overflow_usize", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "no_overflow_u8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u8" + } + ] + }, + { + "name": "no_overflow_u16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u16" + } + ] + }, + { + "name": "no_overflow_u32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "no_overflow_u64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "overflow_usize", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "overflow_u8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u8" + } + ] + }, + { + "name": "overflow_u16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u16" + } + ] + }, + { + "name": "overflow_u32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "overflow_u64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "no_overflow_isize", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "no_overflow_i8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i8" + } + ] + }, + { + "name": "no_overflow_i16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i16" + } + ] + }, + { + "name": "no_overflow_i32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "no_overflow_i64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i64" + } + ] + }, + { + "name": "overflow_isize", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "overflow_i8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i8" + } + ] + }, + { + "name": "overflow_i16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i16" + } + ] + }, + { + "name": "overflow_i32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i32" + } + ] + }, + { + "name": "overflow_i64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "i64" + } + ] + }, + { + "name": "token_identifier_egld", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "EgldOrEsdtTokenIdentifier" + } + ] + }, + { + "name": "token_identifier_is_valid_1", + "mutability": "mutable", + "inputs": [ + { + "name": "token_id", + "type": "EgldOrEsdtTokenIdentifier" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "token_identifier_is_valid_2", + "mutability": "mutable", + "inputs": [ + { + "name": "bytes", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "returns_egld_decimal", + "mutability": "mutable", + "payableInTokens": [ + "EGLD" + ], + "inputs": [], + "outputs": [ + { + "type": "ManagedDecimal<18>" + } + ] + }, + { + "name": "set_contract_address", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "is_empty_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "contains_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "len_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "next_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "previous_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "front_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "back_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "keys_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "values_at_address", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "contains_unordered_at_address", + "mutability": "mutable", + "inputs": [ + { + "name": "item", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "get_by_index", + "mutability": "mutable", + "inputs": [ + { + "name": "index", + "type": "u32" + } + ], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "fill_set_mapper", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "fill_map_mapper", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "fill_unordered_set_mapper", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "u32" + } + ], + "outputs": [] + }, + { + "name": "get_value_from_address_with_keys", + "mutability": "readonly", + "inputs": [ + { + "name": "address", + "type": "Address" + }, + { + "name": "extra_key", + "type": "u32" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "managed_decimal_addition", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal<2>" + }, + { + "name": "second", + "type": "ManagedDecimal<2>" + } + ], + "outputs": [ + { + "type": "ManagedDecimal<2>" + } + ] + }, + { + "name": "managed_decimal_subtraction", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal<2>" + }, + { + "name": "second", + "type": "ManagedDecimal<2>" + } + ], + "outputs": [ + { + "type": "ManagedDecimal<2>" + } + ] + }, + { + "name": "managed_decimal_eq", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal<2>" + }, + { + "name": "second", + "type": "ManagedDecimal<2>" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_decimal_trunc", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "managed_decimal_into_raw_units", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "managed_decimal_ln", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "ManagedDecimal<9>" + } + ], + "outputs": [ + { + "type": "ManagedDecimalSigned<9>" + } + ] + }, + { + "name": "managed_decimal_log2", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "ManagedDecimal<9>" + } + ], + "outputs": [ + { + "type": "ManagedDecimalSigned<9>" + } + ] + }, + { + "name": "managed_decimal_addition_var", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal" + }, + { + "name": "second", + "type": "ManagedDecimal" + } + ], + "outputs": [ + { + "type": "ManagedDecimal" + } + ] + }, + { + "name": "managed_decimal_subtraction_var", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal" + }, + { + "name": "second", + "type": "ManagedDecimal" + } + ], + "outputs": [ + { + "type": "ManagedDecimal" + } + ] + }, + { + "name": "managed_decimal_eq_var", + "mutability": "mutable", + "inputs": [ + { + "name": "first", + "type": "ManagedDecimal" + }, + { + "name": "second", + "type": "ManagedDecimal" + } + ], + "outputs": [ + { + "type": "bool" + } + ] + }, + { + "name": "managed_decimal_ln_var", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "ManagedDecimal" + } + ], + "outputs": [ + { + "type": "ManagedDecimalSigned<9>" + } + ] + }, + { + "name": "managed_decimal_log2_var", + "mutability": "mutable", + "inputs": [ + { + "name": "x", + "type": "ManagedDecimal" + } + ], + "outputs": [ + { + "type": "ManagedDecimalSigned<9>" + } + ] + } + ], + "events": [ + { + "identifier": "event_err_topic", + "inputs": [ + { + "name": "err_topic", + "type": "CodecErrorTestType", + "indexed": true + } + ] + }, + { + "identifier": "event_err_data", + "inputs": [ + { + "name": "data", + "type": "CodecErrorTestType" + } + ] + }, + { + "identifier": "event_a", + "inputs": [ + { + "name": "data", + "type": "u32" + } + ] + }, + { + "identifier": "event_b", + "inputs": [ + { + "name": "arg1", + "type": "BigUint", + "indexed": true + }, + { + "name": "arg2", + "type": "Address", + "indexed": true + }, + { + "name": "data", + "type": "List" + } + ] + } + ], + "esdtAttributes": [], + "hasCallback": true, + "types": { + "CodecErrorTestType": { + "type": "struct", + "docs": [ + "Helper type to explore encode/decode errors." + ] + }, + "OperationCompletionStatus": { + "type": "explicit-enum", + "variants": [ + { + "docs": [ + "indicates that operation was completed" + ], + "name": "completed" + }, + { + "docs": [ + "indicates that operation was interrupted prematurely, due to low gas" + ], + "name": "interrupted" + } + ] + }, + "EsdtTokenPayment": { + "type": "struct", + "fields": [ + { + "name": "token_identifier", + "type": "TokenIdentifier" + }, + { + "name": "token_nonce", + "type": "u64" + }, + { + "name": "amount", + "type": "BigUint" + } + ] + }, + "ExampleEnumSimple": { + "type": "enum", + "docs": [ + "Copied from multiversx-sc serialization tests." + ], + "variants": [ + { + "docs": [ + "Variant 0 doc comment.", + "This will show up in the ABI." + ], + "name": "Variant0", + "discriminant": 0 + }, + { + "name": "Variant1", + "discriminant": 1 + }, + { + "docs": [ + "One line is enough. The one above doesn't have any." + ], + "name": "Variant2", + "discriminant": 2 + } + ] + }, + "ExampleEnumWithFields": { + "type": "enum", + "docs": [ + "Copied from multiversx-sc serialization tests." + ], + "variants": [ + { + "name": "Unit", + "discriminant": 0 + }, + { + "name": "Newtype", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "u32" + } + ] + }, + { + "name": "Tuple", + "discriminant": 2, + "fields": [ + { + "name": "0", + "type": "u32" + }, + { + "name": "1", + "type": "u32" + } + ] + }, + { + "name": "Struct", + "discriminant": 3, + "fields": [ + { + "name": "a", + "type": "u32" + } + ] + } + ] + }, + "ExampleStructManaged": { + "type": "struct", + "fields": [ + { + "name": "big_uint", + "type": "BigUint" + }, + { + "name": "int", + "type": "u32" + }, + { + "name": "bytes", + "type": "bytes" + } + ] + }, + "RgbColor": { + "type": "struct", + "fields": [ + { + "name": "r", + "type": "u8" + }, + { + "name": "g", + "type": "u8" + }, + { + "name": "b", + "type": "u8" + } + ] + }, + "TokenAttributesStruct": { + "type": "struct", + "fields": [ + { + "name": "field_biguint", + "type": "BigUint" + }, + { + "name": "field_u64", + "type": "u64" + }, + { + "name": "field_vec_u32", + "type": "List" + } + ] + } + } +} diff --git a/multiversx_sdk/testutils/testdata/basic-features.wasm b/multiversx_sdk/testutils/testdata/basic-features.wasm new file mode 100755 index 00000000..47005bc7 Binary files /dev/null and b/multiversx_sdk/testutils/testdata/basic-features.wasm differ