Open polym2 opened 1 year ago
The difference was in the "data" parameter. Encoded string from metamask: 0xeacabe140000000000000000000000009e2cdab6be1fdd6e526ac4d037b61e606cf8753e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000
Substituted this line instead $data = $contract->at($this->params->get('SMART_CONTRACT_ADDRESS'))->getData('mintNFT', $this->params->get('BNB_WALLET'), $tokenUrl);
And the program worked as it should. The NFT is created and transferred to the wallet.
What is wrong with the line: $data = $contract->at($this->params->get('SMART_CONTRACT_ADDRESS'))->getData('mintNFT', $this->params->get('BNB_WALLET'), $tokenUrl);
?
This line produces the following encoded string: 0xeacabe140000000000000000000000009e2cdab6be1fdd6e526ac4d037b61e606cf8753e0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003b68747470733a2f2f6e6674616d612e696f2f39343165363866353335623737373663373834653736373134626430353165332f6e66742f6d6574610000000000
Highlight areas that differ.
Help.
My goal is to create NFT tokens through a smart contract method call. It is not possible to call the smart contract method, instead a "duplicate" of the smart contract itself is created. In addition, for some reason, when creating a copy of the contract, there is also an error: Warning! Error encountered during contract execution [gas uint64 overflow]
Through the metamask, the NFT is created.
Here is my code, what am I missing?
Here's what happens when I try to create an NFT through a metamask, and here's what happens when I call the code above.
I'm willing to pay for help if needed.