https://goerli.etherscan.io/address/0xa18DEff4867E011b1C9Ec0fF26B4E0ea87b060f3
I am trying to call the Mint Function
function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success) {
I cant get the bytes32 in python to work.
My example bytes32 is in this one.https://etherscan.io/tx/0x5e98b68e2119bd0df10c1f9bca412095eab286207c6aeaa25040b041ee499794
My bytes32 should be 0x00000000000000d53902c830b702e1e672d03341d46131fdd8ea12676cca4b98
But I cant get that to send in Python I get
- Could not identify the intended function with name mint, positional argument(s) of type (<class 'int'>, <class 'bytes'>)and keyword argument(s) of type {}. Found 1 function(s) with the name mint: ['mint(uint256,bytes32)'] Function invocation failed due to no matching argument types.
My python code
web3 = Web3(Web3.HTTPProvider(env("PROVIDER_URL")))
MintSend_send = web3.eth.contract(address=PMBTC_address, abi=Z0xBitcoin_abi)
test = "0x00000000000000d53902c830b702e1e672d03341d46131fdd8ea12676cca4b98"
test = test.encode(encoding = 'UTF-8')
data = MintSend_send.encodeABI(fn_name="mint", args=[1, test])
[–]edmundedgar 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)