Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transfer error #4958

Open
Caploef-Xie opened this issue Mar 7, 2025 · 0 comments
Open

transfer error #4958

Caploef-Xie opened this issue Mar 7, 2025 · 0 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@Caploef-Xie
Copy link

Ethers Version

6.13.5

Search Terms

transfer,sepolia-test

Describe the Problem

I have encountered a problem.
After updating the OKX wallet plugin in my browser, I used the code 'ethers' to initiate a transaction. I checked in Explorer and found that the transaction was successful, but the code did not return' tx hash ' The code is as follows:
const tx = await tokenContract.transfer(recipientAddress, amountTotal)

Code Snippet

const { walletProvider } = useAppKitProvider('eip155')

  const ethersProvider = new BrowserProvider(walletProvider as any)
  const signer = await ethersProvider.getSigner()
  const abi = [
    {
      constant: false,
      inputs: [
        { name: '_to', type: 'address' },
        { name: '_value', type: 'uint256' },
      ],
      name: 'transfer',
      outputs: [{ name: '', type: 'bool' }],
      type: 'function',
      stateMutability: 'nonpayable',
    },
  ]

  const tokenContract = new ethers.Contract(erc20ContractAddress, abi, signer)
  const tx = await tokenContract.transfer(recipientAddress, amountTotal)

Contract ABI

{
  "Func": "transfer",
  "Params": [
    "0x5e2EdC5B853DC1FC7bfe82467Ce7B659b8604d4c",
    "106000000000000000000"
  ]
}

Errors

I checked in Explorer and found that the transaction was successful, but the code did not return' tx hash '

Environment

No response

Environment (Other)

No response

@Caploef-Xie Caploef-Xie added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Mar 7, 2025
@Caploef-Xie Caploef-Xie changed the title Add Bug Title Here transfer error Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants