Any idea to support auto summon, which invoke the contract.functions.summon function? I tried myself, but got a error of
sum_trx = contract.functions.summon(7).buildTransaction({
"nonce": nonce()}
)
ContractLogicError: execution reverted: ERC721: mint to the zero address
---------------------------------------------------------------------------
ContractLogicError Traceback (most recent call last)
C:\Users\L84176~1\AppData\Local\Temp/ipykernel_33600/3901352448.py in <module>
----> 1 sum_trx = contract.functions.summon(7).buildTransaction({
2 "nonce": nonce()}
3 )
4 contract.address
~\.conda\envs\rarity\lib\site-packages\web3\contract.py in buildTransaction(self, transaction)
1077 )
1078
-> 1079 return build_transaction_for_function(
1080 self.address,
1081 self.web3,
~\.conda\envs\rarity\lib\site-packages\web3\contract.py in build_transaction_for_function(address, web3, function_name, transaction, contract_abi, fn_abi, *args, **kwargs)
1646 )
1647
-> 1648 prepared_transaction = fill_transaction_defaults(web3, prepared_transaction)
1649
1650 return prepared_transaction
~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.curry.__call__()
~\.conda\envs\rarity\lib\site-packages\web3\_utils\transactions.py in fill_transaction_defaults(web3, transaction)
100 if callable(default_getter):
101 if web3 is not None:
--> 102 default_val = default_getter(web3, transaction)
103 else:
104 raise ValueError("You must specify %s in the transaction" % key)
~\.conda\envs\rarity\lib\site-packages\web3\_utils\transactions.py in <lambda>(web3, tx)
64 'value': 0,
65 'data': b'',
---> 66 'gas': lambda web3, tx: web3.eth.estimate_gas(tx),
67 'gasPrice': lambda web3, tx: web3.eth.generate_gas_price(tx) or web3.eth.gas_price,
68 'chainId': lambda web3, tx: web3.eth.chain_id,
~\.conda\envs\rarity\lib\site-packages\web3\eth.py in estimate_gas(self, transaction, block_identifier)
726 block_identifier: Optional[BlockIdentifier] = None
727 ) -> Wei:
--> 728 return self._estimate_gas(transaction, block_identifier)
729
730 def fee_history(
~\.conda\envs\rarity\lib\site-packages\web3\module.py in caller(*args, **kwargs)
55 return LogFilter(eth_module=module, filter_id=err.filter_id)
56 result_formatters, error_formatters, null_result_formatters = response_formatters
---> 57 result = w3.manager.request_blocking(method_str,
58 params,
59 error_formatters,
~\.conda\envs\rarity\lib\site-packages\web3\manager.py in request_blocking(self, method, params, error_formatters, null_result_formatters)
185 """
186 response = self._make_request(method, params)
--> 187 return self.formatted_response(response,
188 params,
189 error_formatters,
~\.conda\envs\rarity\lib\site-packages\web3\manager.py in formatted_response(self, response, params, error_formatters, null_result_formatters)
165 ) -> Any:
166 if "error" in response:
--> 167 apply_error_formatters(error_formatters, response)
168 raise ValueError(response["error"])
169 elif response['result'] in NULL_RESPONSES:
~\.conda\envs\rarity\lib\site-packages\web3\manager.py in apply_error_formatters(error_formatters, response)
65 ) -> RPCResponse:
66 if error_formatters:
---> 67 formatted_resp = pipe(response, error_formatters)
68 return formatted_resp
69 else:
~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.pipe()
~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.c_pipe()
~\.conda\envs\rarity\lib\site-packages\web3\_utils\method_formatters.py in raise_solidity_error_on_revert(response)
564 # Geth case:
565 if 'message' in response['error'] and response['error'].get('code', '') == 3:
--> 566 raise ContractLogicError(response['error']['message'])
567
568 # Geth Revert without error message case:
ContractLogicError: execution reverted: ERC721: mint to the zero address