kolirt / vue-web3-auth

💎 Web3 authentication for Vue3 apps based on WalletConnect Web3Modal v2 and wagmi
https://kolirt.github.io/vue-web3-auth/
MIT License
34 stars 8 forks source link

[Question]: sendTransaction method #12

Closed elevenliu123456 closed 9 months ago

elevenliu123456 commented 9 months ago

Description

When I called the sendTransaction() method, I found that the structure of SendTransaction does not have "value" field,which caused the calldata of transaction cannot be sent.

The code is below:

const callData = data:application/json,{"p":"ierc-20","op":"transfer","tick":"${inscriptionName}","nonce":"${timestamp}","to":[{"amt":"${amount.value}","recv":"${address.value}"}]}

my params is below:

const transaction = { to: constants.AddressZero, value: ethers.utils.parseEther("0"), data: stringToHex(callData) }

the structure of SendTransaction is below:

declare type SendTransaction = { chainId?: number; to: string; account?:0x${string}; gas?: bigint; gasPrice?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; value?: bigint; confirmations?: number; }; the structure I wanted is below:

declare type SendTransaction = { chainId?: number; to: string; account?: 0x${string}; gas?: bigint; gasPrice?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; value?: bigint; confirmations?: number; // the data field is what I want data: string; }

kolirt commented 9 months ago

@elevenliu123456

Please upgrade to v2.2.1 version and check the readme

elevenliu123456 commented 9 months ago

@elevenliu123456

Please upgrade to v2.2.1 version and check the readme Cool !