Coder Social home page Coder Social logo

Comments (3)

kumaryash90 avatar kumaryash90 commented on May 24, 2024

hey @kienngo98 ,
I just checked, the transaction seems to have worked. 1 Avax was transferred to the recipient address:
https://testnet.snowtrace.io/tx/0xd4543f4ae4004fe33d72926a17c03b961e67c2f173f544fc1e45bd42d9c9dc25#internal

It is weird that you get this error though.
Can you post this error in our discord. We can continue there.

from contracts.

kien-ngo avatar kien-ngo commented on May 24, 2024

Hi @kumaryash90 , I have created a thread here: https://discord.com/channels/834227967404146718/1090246555518373888
Thanks!

from contracts.

kien-ngo avatar kien-ngo commented on May 24, 2024

Hey guys for @kumaryash90 has helped me fix it. Basically the value has to be passed inside contract.call() instead of the overrides props.
Here's the code:

<Web3Button
      contractAddress="0xa56266B854287e15612b2A7d6077f4CECdF508D8"
      action={(contract) => {
        contract.call(
          "airdrop",
          NATIVE_TOKEN_ADDRESS,
          address,
          ["0xd587924ce50c7031************************"],
          ["1000000000000000000"],
          {
            value: parseEther("1"),
          }
        );
      }}
      // overrides={{
      //   value: parseEther("1"),
      //   gasLimit: 1000000,
      // }}
    >
      Batch send
    </Web3Button>

from contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.