body_hash
stringlengths 64
64
| body
stringlengths 23
109k
| docstring
stringlengths 1
57k
| path
stringlengths 4
198
| name
stringlengths 1
115
| repository_name
stringlengths 7
111
| repository_stars
float64 0
191k
| lang
stringclasses 1
value | body_without_docstring
stringlengths 14
108k
| unified
stringlengths 45
133k
|
---|---|---|---|---|---|---|---|---|---|
687dfac0950732365c580176289be1f67bed0b6a35eea8671dbe2d8d8c5059ec | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
97cb33886d64af0a51559709537b845f521d6110be3b37d16b1d9830eccf83f5 | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
bae01500c81769b74ffc88d6efbb1f7af2ca8a52502fc44a7f09f71e9799ca3f | def validate_and_normalize_inputs(self, bundle_id: int):
'Validate the inputs to the getTokenCountOfBundle method.'
self.validator.assert_valid(method_name='getTokenCountOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id | Validate the inputs to the getTokenCountOfBundle method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, bundle_id: int):
self.validator.assert_valid(method_name='getTokenCountOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id | def validate_and_normalize_inputs(self, bundle_id: int):
self.validator.assert_valid(method_name='getTokenCountOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id<|docstring|>Validate the inputs to the getTokenCountOfBundle method.<|endoftext|> |
4dbd85325bb781318235854f68600ac0ed27f80b724ce05747411bc4c99d90ac | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return int(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return int(returned) | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return int(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
1ea94c5cde2acdaec779f72db43e854367ce44641b05b307e34dab1c16534fb2 | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict()) | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
7de3caed14558a634801fc93eae65e6cb36c8c2cfd5a065d55e5e2f574f0a620 | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
a90b0e101a2a159a2b28a404e7135d9513bfd4f148b277199a5bae53eeaaad39 | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
0e118cd4b84a10973cdb95572b8baffcb82e658c4d34217e309995234841ff6a | def validate_and_normalize_inputs(self, bundle_id: int, index: int):
'Validate the inputs to the getTokenOfBundle method.'
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='index', argument_value=index)
index = int(index)
return (bundle_id, index) | Validate the inputs to the getTokenOfBundle method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, bundle_id: int, index: int):
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='index', argument_value=index)
index = int(index)
return (bundle_id, index) | def validate_and_normalize_inputs(self, bundle_id: int, index: int):
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
self.validator.assert_valid(method_name='getTokenOfBundle', parameter_name='index', argument_value=index)
index = int(index)
return (bundle_id, index)<|docstring|>Validate the inputs to the getTokenOfBundle method.<|endoftext|> |
b25a21278c89f98d3eeebe792dd85bbf5127b42b84a780c31d708f88b2777b7c | def call(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> ITokenBundleToken:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id, index).call(tx_params.as_dict())
return ITokenBundleToken(assetContract=returned[0], tokenType=returned[1], tokenId=returned[2], totalAmount=returned[3]) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> ITokenBundleToken:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id, index).call(tx_params.as_dict())
return ITokenBundleToken(assetContract=returned[0], tokenType=returned[1], tokenId=returned[2], totalAmount=returned[3]) | def call(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> ITokenBundleToken:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id, index).call(tx_params.as_dict())
return ITokenBundleToken(assetContract=returned[0], tokenType=returned[1], tokenId=returned[2], totalAmount=returned[3])<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
8a44ac5d6b7365b57032e4d0b07f5ebc3fedd81e790df8b24e7e7016209a0342 | def send_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).transact(tx_params.as_dict()) | def send_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
62626972efad051d3b82c00ff80333207c01e08010acc774b09af29af4826b06 | def build_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> dict:
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).buildTransaction(tx_params.as_dict()) | def build_transaction(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> dict:
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
f82e016e2f1ca1192a404dca98d15c4c352c194e78f51740b539a1fac61b01b7 | def estimate_gas(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> int:
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).estimateGas(tx_params.as_dict()) | def estimate_gas(self, bundle_id: int, index: int, tx_params: Optional[TxParams]=None) -> int:
(bundle_id, index) = self.validate_and_normalize_inputs(bundle_id, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id, index).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
5a1a277ae42ad8c01ac53bbf365feb7b533b65919c640dc5a83428c614195bbb | def validate_and_normalize_inputs(self, bundle_id: int):
'Validate the inputs to the getUriOfBundle method.'
self.validator.assert_valid(method_name='getUriOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id | Validate the inputs to the getUriOfBundle method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, bundle_id: int):
self.validator.assert_valid(method_name='getUriOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id | def validate_and_normalize_inputs(self, bundle_id: int):
self.validator.assert_valid(method_name='getUriOfBundle', parameter_name='_bundleId', argument_value=bundle_id)
bundle_id = int(bundle_id)
return bundle_id<|docstring|>Validate the inputs to the getUriOfBundle method.<|endoftext|> |
20552575040955c283b51f1d2c51649acd4f58285e42b829b921f51dedb43ab2 | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return str(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return str(returned) | def call(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(bundle_id).call(tx_params.as_dict())
return str(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
1ea94c5cde2acdaec779f72db43e854367ce44641b05b307e34dab1c16534fb2 | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict()) | def send_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
7de3caed14558a634801fc93eae65e6cb36c8c2cfd5a065d55e5e2f574f0a620 | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> dict:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
a90b0e101a2a159a2b28a404e7135d9513bfd4f148b277199a5bae53eeaaad39 | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, bundle_id: int, tx_params: Optional[TxParams]=None) -> int:
bundle_id = self.validate_and_normalize_inputs(bundle_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(bundle_id).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
9fdeb13e07cc7386097b3b24bbe2bfd4695d886b3dc6911f43f9f7dccba1615f | def validate_and_normalize_inputs(self, token_id: int):
'Validate the inputs to the getWrappedContents method.'
self.validator.assert_valid(method_name='getWrappedContents', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | Validate the inputs to the getWrappedContents method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getWrappedContents', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getWrappedContents', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id<|docstring|>Validate the inputs to the getWrappedContents method.<|endoftext|> |
80b09a3963b3355f020b3061d2516f7a7726f1cb35c293fef762190c1264aba2 | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> List[ITokenBundleToken]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(token_id).call(tx_params.as_dict())
return [ITokenBundleToken(assetContract=element[0], tokenType=element[1], tokenId=element[2], totalAmount=element[3]) for element in returned] | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> List[ITokenBundleToken]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(token_id).call(tx_params.as_dict())
return [ITokenBundleToken(assetContract=element[0], tokenType=element[1], tokenId=element[2], totalAmount=element[3]) for element in returned] | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> List[ITokenBundleToken]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(token_id).call(tx_params.as_dict())
return [ITokenBundleToken(assetContract=element[0], tokenType=element[1], tokenId=element[2], totalAmount=element[3]) for element in returned]<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
e27f80815f34ab833e17016d58c78e88a1e64dce6c8824207fba04df6aa3d88e | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).transact(tx_params.as_dict()) | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
687dfac0950732365c580176289be1f67bed0b6a35eea8671dbe2d8d8c5059ec | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
97cb33886d64af0a51559709537b845f521d6110be3b37d16b1d9830eccf83f5 | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
d5d848a7501db65a323d9687e5c94b66d519ca5dda75c6e05d5d9876f1c2c90c | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
'Validate the inputs to the grantRole method.'
self.validator.assert_valid(method_name='grantRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='grantRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | Validate the inputs to the grantRole method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='grantRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='grantRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='grantRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='grantRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account)<|docstring|>Validate the inputs to the grantRole method.<|endoftext|> |
c4d9db112692cb5fb10a36a80b40e04be8f2ed29b834903d93ecfa91ad6d9eaa | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(role, account).call(tx_params.as_dict()) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(role, account).call(tx_params.as_dict()) | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(role, account).call(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
b8d23a1f7656cf499417808f9816db13ec9c51752e526f9f9adbe6051d91de6d | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
0503017ec0e8b6356d518ee7da3c9e8ce5c90f09f6713bddac26862095b3c454 | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
b0e3e1536e50aa635ad61b23ac869a36eae01e5c6eb65f3d0d9d74fb83fce71d | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
1986f225df37848fc177efb48a58ed4c4bcf2348ead046415008f6c888c11ac0 | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
'Validate the inputs to the hasRole method.'
self.validator.assert_valid(method_name='hasRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | Validate the inputs to the hasRole method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='hasRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='hasRole', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRole', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account)<|docstring|>Validate the inputs to the hasRole method.<|endoftext|> |
3a72485dd847afc34a3c7d9d2021edd3a82d4412f70ed0bc2537c42b74a6f18c | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned) | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
b8d23a1f7656cf499417808f9816db13ec9c51752e526f9f9adbe6051d91de6d | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
0503017ec0e8b6356d518ee7da3c9e8ce5c90f09f6713bddac26862095b3c454 | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
b0e3e1536e50aa635ad61b23ac869a36eae01e5c6eb65f3d0d9d74fb83fce71d | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
be151eeb2664e0bef0906271e6a7ea3dd28dc20a89bb8c0e88100ddd0d0e1837 | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
'Validate the inputs to the hasRoleWithSwitch method.'
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | Validate the inputs to the hasRoleWithSwitch method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account) | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], account: str):
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='hasRoleWithSwitch', parameter_name='account', argument_value=account)
account = self.validate_and_checksum_address(account)
return (role, account)<|docstring|>Validate the inputs to the hasRoleWithSwitch method.<|endoftext|> |
3a72485dd847afc34a3c7d9d2021edd3a82d4412f70ed0bc2537c42b74a6f18c | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned) | def call(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(role, account).call(tx_params.as_dict())
return bool(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
b8d23a1f7656cf499417808f9816db13ec9c51752e526f9f9adbe6051d91de6d | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict()) | def send_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
0503017ec0e8b6356d518ee7da3c9e8ce5c90f09f6713bddac26862095b3c454 | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict()) | def build_transaction(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> dict:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
b0e3e1536e50aa635ad61b23ac869a36eae01e5c6eb65f3d0d9d74fb83fce71d | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], account: str, tx_params: Optional[TxParams]=None) -> int:
(role, account) = self.validate_and_normalize_inputs(role, account)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, account).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
af4cb878541e5e5888468a60591b10289ba83a09396c6843b563fb385f88cd35 | def validate_and_normalize_inputs(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int):
'Validate the inputs to the initialize method.'
self.validator.assert_valid(method_name='initialize', parameter_name='_defaultAdmin', argument_value=default_admin)
default_admin = self.validate_and_checksum_address(default_admin)
self.validator.assert_valid(method_name='initialize', parameter_name='_name', argument_value=name)
self.validator.assert_valid(method_name='initialize', parameter_name='_symbol', argument_value=symbol)
self.validator.assert_valid(method_name='initialize', parameter_name='_contractURI', argument_value=contract_uri)
self.validator.assert_valid(method_name='initialize', parameter_name='_trustedForwarders', argument_value=trusted_forwarders)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyRecipient', argument_value=royalty_recipient)
royalty_recipient = self.validate_and_checksum_address(royalty_recipient)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyBps', argument_value=royalty_bps)
royalty_bps = int(royalty_bps)
return (default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) | Validate the inputs to the initialize method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int):
self.validator.assert_valid(method_name='initialize', parameter_name='_defaultAdmin', argument_value=default_admin)
default_admin = self.validate_and_checksum_address(default_admin)
self.validator.assert_valid(method_name='initialize', parameter_name='_name', argument_value=name)
self.validator.assert_valid(method_name='initialize', parameter_name='_symbol', argument_value=symbol)
self.validator.assert_valid(method_name='initialize', parameter_name='_contractURI', argument_value=contract_uri)
self.validator.assert_valid(method_name='initialize', parameter_name='_trustedForwarders', argument_value=trusted_forwarders)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyRecipient', argument_value=royalty_recipient)
royalty_recipient = self.validate_and_checksum_address(royalty_recipient)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyBps', argument_value=royalty_bps)
royalty_bps = int(royalty_bps)
return (default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) | def validate_and_normalize_inputs(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int):
self.validator.assert_valid(method_name='initialize', parameter_name='_defaultAdmin', argument_value=default_admin)
default_admin = self.validate_and_checksum_address(default_admin)
self.validator.assert_valid(method_name='initialize', parameter_name='_name', argument_value=name)
self.validator.assert_valid(method_name='initialize', parameter_name='_symbol', argument_value=symbol)
self.validator.assert_valid(method_name='initialize', parameter_name='_contractURI', argument_value=contract_uri)
self.validator.assert_valid(method_name='initialize', parameter_name='_trustedForwarders', argument_value=trusted_forwarders)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyRecipient', argument_value=royalty_recipient)
royalty_recipient = self.validate_and_checksum_address(royalty_recipient)
self.validator.assert_valid(method_name='initialize', parameter_name='_royaltyBps', argument_value=royalty_bps)
royalty_bps = int(royalty_bps)
return (default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)<|docstring|>Validate the inputs to the initialize method.<|endoftext|> |
51f7da98aaa342800854b21f7006d50da3c4e72efdbb32baf126ea936af2d2dc | def call(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).call(tx_params.as_dict()) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).call(tx_params.as_dict()) | def call(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).call(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
3e876a317412af11e4fb7ce64a15b6592f8a1d2ee6db82747bc27731d194ba9d | def send_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).transact(tx_params.as_dict()) | def send_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
69b16eaf9376c84429a57a2f704d23b9a912b69aa329c5e7694405dd236193a0 | def build_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> dict:
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).buildTransaction(tx_params.as_dict()) | def build_transaction(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> dict:
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
8f586354ff3b559ec01a77efffcce285808baa8a1c28d93bb00327672cd78284 | def estimate_gas(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> int:
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).estimateGas(tx_params.as_dict()) | def estimate_gas(self, default_admin: str, name: str, symbol: str, contract_uri: str, trusted_forwarders: List[str], royalty_recipient: str, royalty_bps: int, tx_params: Optional[TxParams]=None) -> int:
(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps) = self.validate_and_normalize_inputs(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(default_admin, name, symbol, contract_uri, trusted_forwarders, royalty_recipient, royalty_bps).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
755fe0aa8456a0f137869fd73d6718f54006209a79421fcc99713aefdee2189c | def validate_and_normalize_inputs(self, owner: str, operator: str):
'Validate the inputs to the isApprovedForAll method.'
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='operator', argument_value=operator)
operator = self.validate_and_checksum_address(operator)
return (owner, operator) | Validate the inputs to the isApprovedForAll method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, owner: str, operator: str):
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='operator', argument_value=operator)
operator = self.validate_and_checksum_address(operator)
return (owner, operator) | def validate_and_normalize_inputs(self, owner: str, operator: str):
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
self.validator.assert_valid(method_name='isApprovedForAll', parameter_name='operator', argument_value=operator)
operator = self.validate_and_checksum_address(operator)
return (owner, operator)<|docstring|>Validate the inputs to the isApprovedForAll method.<|endoftext|> |
b593dcc94519a8b0da6dc96045ba7b5550743f71f02226843bb549ab01cbd0bf | def call(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(owner, operator).call(tx_params.as_dict())
return bool(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(owner, operator).call(tx_params.as_dict())
return bool(returned) | def call(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(owner, operator).call(tx_params.as_dict())
return bool(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
f62afe4ab067f133116f1df5e6c2025554a3bc9dc85e675389dc5a006b5dbf8c | def send_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).transact(tx_params.as_dict()) | def send_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
2ef06d943b16953d7c5d76f32fdc06bc14ad773d6c41fb8f189f6480346ea09a | def build_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> dict:
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).buildTransaction(tx_params.as_dict()) | def build_transaction(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> dict:
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
2acf091f01a3d2666f515c57ff31bd7ed9fb7c1290f462e8ed1af670a34ac633 | def estimate_gas(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> int:
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).estimateGas(tx_params.as_dict()) | def estimate_gas(self, owner: str, operator: str, tx_params: Optional[TxParams]=None) -> int:
(owner, operator) = self.validate_and_normalize_inputs(owner, operator)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner, operator).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
50849b4501faac42ba086d4c6e131bcaa738cee8a4247181f015738ce4d66ae1 | def validate_and_normalize_inputs(self, forwarder: str):
'Validate the inputs to the isTrustedForwarder method.'
self.validator.assert_valid(method_name='isTrustedForwarder', parameter_name='forwarder', argument_value=forwarder)
forwarder = self.validate_and_checksum_address(forwarder)
return forwarder | Validate the inputs to the isTrustedForwarder method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, forwarder: str):
self.validator.assert_valid(method_name='isTrustedForwarder', parameter_name='forwarder', argument_value=forwarder)
forwarder = self.validate_and_checksum_address(forwarder)
return forwarder | def validate_and_normalize_inputs(self, forwarder: str):
self.validator.assert_valid(method_name='isTrustedForwarder', parameter_name='forwarder', argument_value=forwarder)
forwarder = self.validate_and_checksum_address(forwarder)
return forwarder<|docstring|>Validate the inputs to the isTrustedForwarder method.<|endoftext|> |
fd3797c63332f49c6414fe894638ff8c8e9c4c7425bdff2ef2d0687969a43a72 | def call(self, forwarder: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(forwarder).call(tx_params.as_dict())
return bool(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, forwarder: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(forwarder).call(tx_params.as_dict())
return bool(returned) | def call(self, forwarder: str, tx_params: Optional[TxParams]=None) -> bool:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(forwarder).call(tx_params.as_dict())
return bool(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
462257037d766ae22d7463c2330e66de42dc8b79f9d7cc36d882957e448d5838 | def send_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).transact(tx_params.as_dict()) | def send_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
221a9d1b817f7547ae8583b2d488bbad6dd688c29f92a161488bf77590c484fd | def build_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> dict:
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).buildTransaction(tx_params.as_dict()) | def build_transaction(self, forwarder: str, tx_params: Optional[TxParams]=None) -> dict:
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
79280a6dd0aff18537bb43c310da8fcafcbcfb35b22c97a66c78a5bf06f27abd | def estimate_gas(self, forwarder: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, forwarder: str, tx_params: Optional[TxParams]=None) -> int:
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).estimateGas(tx_params.as_dict()) | def estimate_gas(self, forwarder: str, tx_params: Optional[TxParams]=None) -> int:
forwarder = self.validate_and_normalize_inputs(forwarder)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(forwarder).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
6e25a0f41d850cd5dcd1798ae08ec37a88d799b9d0befc6b3a1e7572595f1889 | def validate_and_normalize_inputs(self, data: List[Union[(bytes, str)]]):
'Validate the inputs to the multicall method.'
self.validator.assert_valid(method_name='multicall', parameter_name='data', argument_value=data)
return data | Validate the inputs to the multicall method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, data: List[Union[(bytes, str)]]):
self.validator.assert_valid(method_name='multicall', parameter_name='data', argument_value=data)
return data | def validate_and_normalize_inputs(self, data: List[Union[(bytes, str)]]):
self.validator.assert_valid(method_name='multicall', parameter_name='data', argument_value=data)
return data<|docstring|>Validate the inputs to the multicall method.<|endoftext|> |
34297eeef6ea1bfaa94fe8e590d2a7b50200ddf331d51a4c4ebbe572087c1d29 | def call(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> List[Union[(bytes, str)]]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(data).call(tx_params.as_dict())
return [Union[(bytes, str)](element) for element in returned] | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> List[Union[(bytes, str)]]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(data).call(tx_params.as_dict())
return [Union[(bytes, str)](element) for element in returned] | def call(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> List[Union[(bytes, str)]]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(data).call(tx_params.as_dict())
return [Union[(bytes, str)](element) for element in returned]<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
796e55107e765fb132f187b6f50a7d62d0c497cb61fb0992a160ff206275bd38 | def send_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).transact(tx_params.as_dict()) | def send_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
48e2f0aaea44c2673a42c7cd016e2a5964a566a5628baed3820891f8aa44cc5f | def build_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> dict:
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).buildTransaction(tx_params.as_dict()) | def build_transaction(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> dict:
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
aa4df43fafc4e4a1ca58c452f630de949e3c6cc81a93ac11427ebb44aacd6ca3 | def estimate_gas(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> int:
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).estimateGas(tx_params.as_dict()) | def estimate_gas(self, data: List[Union[(bytes, str)]], tx_params: Optional[TxParams]=None) -> int:
data = self.validate_and_normalize_inputs(data)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(data).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
ca32d6807ebd9ceb15a2b64a172e6e81cfc9485bd1945b8aaf7461f0c2f67e87 | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned) | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
0d1feb2b3a7b114d5d1bcc63471ea6bd5ae2bbae2a964758f4d2e917c7d5b29a | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return int(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return int(returned) | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return int(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
cde5adc96b2908b4d9a2cd228964370884616cf7e485e44c0ccb91bff76d712a | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)]):
'Validate the inputs to the onERC1155BatchReceived method.'
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_2', argument_value=index_2)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_3', argument_value=index_3)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4) | Validate the inputs to the onERC1155BatchReceived method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_2', argument_value=index_2)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_3', argument_value=index_3)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4) | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_2', argument_value=index_2)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_3', argument_value=index_3)
self.validator.assert_valid(method_name='onERC1155BatchReceived', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4)<|docstring|>Validate the inputs to the onERC1155BatchReceived method.<|endoftext|> |
37d30a583b135e755cb7b8ec346b0dce566d9d9c181120678c1a617f2bda7586 | def call(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | def call(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
fe2686d5be346b0839d25725c3b37ca6677d167dfe4554dd3ebb206db04bae81 | def send_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict()) | def send_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
357a967984ad550b9f828d3d194a3534dd511f87e1b9753c202968d6d72736b1 | def build_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict()) | def build_transaction(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
88f0de5a08d6be87a46b933558e44390dc91c44e09a94d17b98b562f9ef5c510 | def estimate_gas(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict()) | def estimate_gas(self, index_0: str, index_1: str, index_2: List[int], index_3: List[int], index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
3bafd24ea296f9c9fe8d815603628da85dd709d7a25730e4c5969786b8486fb5 | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)]):
'Validate the inputs to the onERC1155Received method.'
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_3', argument_value=index_3)
index_3 = int(index_3)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4) | Validate the inputs to the onERC1155Received method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_3', argument_value=index_3)
index_3 = int(index_3)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4) | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_3', argument_value=index_3)
index_3 = int(index_3)
self.validator.assert_valid(method_name='onERC1155Received', parameter_name='index_4', argument_value=index_4)
return (index_0, index_1, index_2, index_3, index_4)<|docstring|>Validate the inputs to the onERC1155Received method.<|endoftext|> |
acff61bedc7648e02de178a1781117f93a749ab2e2f910934c6e0ba9a479ccf0 | def call(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | def call(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3, index_4).call(tx_params.as_dict())
return Union[(bytes, str)](returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
1dc9d7c6195a716ec40383fddb514c00a0a85a6d6fdd7b61d0ba7ebfb276416b | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict()) | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
aba245ca15b3e63f21527ee7770a7ef92715f5bcc7d632fb483682edc31e50f0 | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict()) | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
875fc15af03037f16498101123d0c9e62845b97506ef04979e2cc63619e780f8 | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict()) | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: int, index_4: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3, index_4) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3, index_4)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3, index_4).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
6ade32c73151975081d8e9ffa42f098546c3b700dae8434fefbcf91767843903 | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)]):
'Validate the inputs to the onERC721Received method.'
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_3', argument_value=index_3)
return (index_0, index_1, index_2, index_3) | Validate the inputs to the onERC721Received method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_3', argument_value=index_3)
return (index_0, index_1, index_2, index_3) | def validate_and_normalize_inputs(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)]):
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_0', argument_value=index_0)
index_0 = self.validate_and_checksum_address(index_0)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_1', argument_value=index_1)
index_1 = self.validate_and_checksum_address(index_1)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_2', argument_value=index_2)
index_2 = int(index_2)
self.validator.assert_valid(method_name='onERC721Received', parameter_name='index_3', argument_value=index_3)
return (index_0, index_1, index_2, index_3)<|docstring|>Validate the inputs to the onERC721Received method.<|endoftext|> |
63fbbc15de12ec82f89b5d1b2acc1f514c23063ffcf6fa1edf4534e5e7cd0b51 | def call(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3).call(tx_params.as_dict())
return Union[(bytes, str)](returned) | def call(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method(index_0, index_1, index_2, index_3).call(tx_params.as_dict())
return Union[(bytes, str)](returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
39e87d70b7152809e2e6245e5433ee5044989ba73fae0c33aa0c4bad871f9f02 | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).transact(tx_params.as_dict()) | def send_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
f2f01c802d485f07bc9f37ccf18ba849505d1ca56f26033cfa7fcd941cd5d0b0 | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).buildTransaction(tx_params.as_dict()) | def build_transaction(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
04c37b29a0118819b754819e4e827655675f543cee66d4033781c24df94a74e3 | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).estimateGas(tx_params.as_dict()) | def estimate_gas(self, index_0: str, index_1: str, index_2: int, index_3: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
(index_0, index_1, index_2, index_3) = self.validate_and_normalize_inputs(index_0, index_1, index_2, index_3)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(index_0, index_1, index_2, index_3).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
ca32d6807ebd9ceb15a2b64a172e6e81cfc9485bd1945b8aaf7461f0c2f67e87 | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned) | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned) | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underlying_method().call(tx_params.as_dict())
return str(returned)<|docstring|>Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method.<|endoftext|> |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict()) | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact(tx_params.as_dict())<|docstring|>Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters<|endoftext|> |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.