Giter Club home page Giter Club logo

Comments (4)

albertov19 avatar albertov19 commented on August 18, 2024 1

@vminkov We have the same issue with Hardhat forking. The main problem is that precompile contracts (such as xcDOT) provide functions that access Moonbeam's runtime directly. Note that xcDOT address has only a basic opcode stored in it, that is because calls to precompiles are intercepted by Moonbeam's EVM and is not executed "opcode-by-opcode", but it is executed by the runtime itself.

Consequently, when forking, the forked network (with Forge in this case) works as a "Geth client" fork, in which these things don't work. The approve call would have the following function signature 0x75247a58 which does not exist in the precompile's bytecode (eth_getCode RPC call).

Hope this clarifies why it is not working, regards!

from moonbeam-docs.

albertov19 avatar albertov19 commented on August 18, 2024

Hey @vminkov are you testing against Moonbase Alpha? Moonbeam? I'm guessing Moonbeam as you are referring to xcDOT, but just wanted to confirm. Can you provide a bit more of context?

Thanks in advance

from moonbeam-docs.

vminkov avatar vminkov commented on August 18, 2024

Hey @vminkov are you testing against Moonbase Alpha? Moonbeam? I'm guessing Moonbeam as you are referring to xcDOT, but just wanted to confirm. Can you provide a bit more of context?

Thanks in advance

Hey there, @albertov19

I am testing against Moonbeam with this command:
forge test --fork-url https://rpc.api.moonbeam.network -vvvv --match-test testDotSwap

from moonbeam-docs.

albertov19 avatar albertov19 commented on August 18, 2024

Hey @vminkov are you testing against Moonbase Alpha? Moonbeam? I'm guessing Moonbeam as you are referring to xcDOT, but just wanted to confirm. Can you provide a bit more of context?
Thanks in advance

Hey there, @albertov19

I am testing against Moonbeam with this command: forge test --fork-url https://rpc.api.moonbeam.network -vvvv --match-test testDotSwap

I'm almost certain that Mainnet Forking is not compatible with our precompile contracts. We'll do some internal testing and get back to you.

from moonbeam-docs.

Related Issues (19)

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.