flutter_web3 icon indicating copy to clipboard operation
flutter_web3 copied to clipboard

ERC721 Support

Open ronmegini opened this issue 2 years ago • 6 comments

Description: I believe that support for ERC721 is an essential feature in this module.

ronmegini avatar Feb 01 '23 16:02 ronmegini

As far as I know, it doesn't supported yet, please correct me if I'm wrong.

ronmegini avatar Feb 01 '23 16:02 ronmegini

@ronmegini Currently, it does not. Only support ERC20 contract. But still you can use this package to create ERC721 contracts.

4xMafole avatar Feb 04 '23 08:02 4xMafole

@ronmegini Currently, it does not. Only support ERC20 contract. But still you can use this package to create ERC721 contracts.

I am talking about interaction with already deployed ERC721 contracts' functions. Is there an estimated deployment time for this?

ronmegini avatar Feb 05 '23 06:02 ronmegini

I think creating a PR for this ability although Im not very experienced with dart. Is this project active? Someone can review the code and approve the PR?

ronmegini avatar Feb 05 '23 06:02 ronmegini

Do you mean like so ?

  Future<String> _mintNFT( 
     String collectionAddress, 
     String dataURI, 
   ) async { 
     //Getting the contract deployed 
     Contract deployedContract = Contract( 
         collectionAddress, NFTContract.contractABI, provider!.getSigner()); 
  
     //Send the function and data to interact with the contract 
     final transaction = await deployedContract.send('mint', [dataURI]); 
  
     //Getting the receipt from the transaction 
     final receipt = await transaction.wait(); 
  
     //Returning the transaction hash 
     return receipt.transactionHash; 
   } 
 

4xMafole avatar Feb 05 '23 07:02 4xMafole

@4xMafole I thought about creating new ContractERC721 (same as ContractERC20), according to ERC721 standards

ronmegini avatar Feb 07 '23 14:02 ronmegini