Closed HadiDevLabx closed 12 months ago
What exactly is the issue?
"I need help creating (deploying?) contracts and documentation for deployed contracts" doesn't give me the info I need to help you.
It looks like you are trying to execute a custom contract call. I assume it isn't working. What's the error that you're getting?
Future<dynamic> future = testContractStore2(walletConnect: widget.web3App, session: widget.session, contractAddress: '0xaaE9BcA71Eb2B03E36E9579C1C263042869d84A9', value: 0.00007355491950105679);
Future
required double value, }) async { // Getting the deployed contract using ABI and contract address debugPrint("12"); final contract = DeployedContract( ContractAbi.fromJson( await rootBundle.loadString('assets/abis/tokenAbi.abi.json'), 'TestStorage1', // The name of the contract ), EthereumAddress.fromHex(contractAddress), ); // Create a transaction from contract, mint function and data uri. BigInt amountInWei = BigInt.from(0.000001 * 1000000000000000000);
final Transaction transaction = Transaction.callContract( contract: contract, // The contract to call the function on function: contract.function('transfer'), // The function to call parameters: [ EthereumAddress.fromHex(contractAddress),
amountInWei
],
); // Send the transaction to the wallet to be executed return await walletConnect.request( topic: session.topic, chainId: NamespaceUtils.getChainFromAccount( session.namespaces.values.first.accounts.first, ), request: SessionRequestParams( method: 'eth_sendTransaction', params: transaction.toJson( // From address is the account of the session fromAddress: NamespaceUtils.getAccount( session.namespaces.values.first.accounts.first, ), toAddress: "0x710dcda140962b487e6934e7fa8fa6be62a5c61e", ), ), );
}.
OUTPUT
I/flutter (31325): │ #0 Pairing._onMessageEvent (package:walletconnect_flutter_v2/apis/core/pairing/pairing.dart:642:17)
I/flutter (31325): │ #1
I have created a custom contract call here: https://github.com/WalletConnect/Web3ModalFlutter/blob/2981053456ecd3511ca2e3a7f0def7c75e22af62/example/sign/lib/utils/crypto/eip155.dart#L197
Looks like you need to put your transaction json into an array to get it to work.
i have issue to create my own contract i have added gas int custom is i have to add things custom i need help to create contract and need documentation for deployed contract looking forward