Comments (4)
@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.
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.
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.
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 advanceHey 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)
- Get syncing info always return null HOT 5
- Tracing node instructions incorrectly recommend `--execution native` HOT 1
- Polkadot.js does not work with Brave Shield HOT 1
- AmsterDOT Bounty 1 - Launch a Cross-Chain Asset owned by a Smart Contract
- AmsterDOT Moonbeam Bounty 2 - Build a DApp that Uses XCM HOT 2
- Add Ankr to Endpoint Providers HOT 5
- ETH-Shanghai Hackathon Best Moonbeam Project Bounty HOT 3
- [help] Is there any XC-20s Cross-Chain Transfer tutorial doc with local machine enviroment HOT 2
- {target=_blank) shown on foundry page HOT 2
- Add Getblock public and dedicated endpoints HOT 1
- Remove `eth_newPendingTransactionFilter`
- Change `--state-cache-size`
- Chopsticks docs suggestion HOT 2
- Update Full Node flags/options HOT 2
- [Feedback] Deploy Contracts with Truffle - /builders/build/eth-api/dev-env/truffle/ HOT 4
- [Feedback] Deploy Contracts with Truffle - /builders/build/eth-api/dev-env/truffle/ HOT 6
- [Feedback] Send Transactions & Deploy Contracts with Web3.js - /builders/build/eth-api/libraries/web3js/ HOT 3
- Instructions should only check one mapping HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moonbeam-docs.