Giter Site home page Giter Site logo

Comments (11)

alexanderhawl avatar alexanderhawl commented on June 26, 2024

deploy environment: remix vm cancun
solidity version : 0.8.25
optimization: no

from remix-project.

Aniket-Engg avatar Aniket-Engg commented on June 26, 2024

Hello @alexanderhawl , do you see any errors in browser console too?

from remix-project.

alexanderhawl avatar alexanderhawl commented on June 26, 2024

just only revert. But I replay it in blocksec phalcon exploer, it says invalid opcode MCOPY.

from remix-project.

Aniket-Engg avatar Aniket-Engg commented on June 26, 2024

just only revert. But I replay it in blocksec phalcon exploer, it says invalid opcode MCOPY.

Can you share error screenshot?

This might not be related to cancun VM as if I compile using Shanghai EVM version and deploy to Remix VM(Shanghai) method call still fails

from remix-project.

Aniket-Engg avatar Aniket-Engg commented on June 26, 2024

Also, address(this).balance returns the ETH balance of contract not the token balance

from remix-project.

alexanderhawl avatar alexanderhawl commented on June 26, 2024

I tried the code in foundry, the evm_version is shanghai, it also reverts.

from remix-project.

alexanderhawl avatar alexanderhawl commented on June 26, 2024

I used blocksec phalcon to fork a eth mainnet, transaction always went well no matter the compiler is cancun or shanghai. But if I selected remix vm cancun or shanghai, it reverted.
the revert picture in remix vm
the successful transaction in phalcon fork
https://app.blocksec.com/explorer/tx/eth/0xe3dd3123b5960961e8fd9c7acf84325afc08703662594e2c3335ad016fcac7cf?event=fork&forkId=fork_57869ed1534f4c6c926a5924ebbae1cd

from remix-project.

alexanderhawl avatar alexanderhawl commented on June 26, 2024

Uploading Screenshot_20240516_224253.png…

from remix-project.

Aniket-Engg avatar Aniket-Engg commented on June 26, 2024

Difficult to deduce what's wrong

from remix-project.

alexanderhawl avatar alexanderhawl commented on June 26, 2024

I found the error reason, in the remix vm , the token address is not a contract, so the balanceOf function is error. the res variable is 0x. So the abi.decode revert. Thanks your response.

from remix-project.

Aniket-Engg avatar Aniket-Engg commented on June 26, 2024

okay. That's great. Hope you can fix it now. Closing this.

from remix-project.

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.