Devland is a framework for running a simple testing blockchain (anvil) and installing a basic instance of the Euler contracts for development and testing purposes.
- Fast and deterministic: The entire environment can be created and installed in a second or two. This lets you setup testing/dev scenarios and instantly reset them to the starting conditions, which is helpful for development. By editing the file
script/DeployDev.sol
you can create self-contained scenarios and send them to other devs, who can get started instantly. - Lightweight: It does not use forge-style nested submodules. Instead, each project is checked out exactly once in a
libflat
directory, and then remappings are used to map depenencies for each project. This means that each repo is only checked out once, saving time and diskspace. However, it also means that only a single version of a dependency can be installed, globally.
First install foundry then run:
./install.sh
./run.sh
If all goes well, your RPC will be available on the standard http://127.0.0.1:8545
endpoint.
The default is just to use the standard anvil mnemonic. For example this is user 0:
- Private key:
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
- Address:
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Import the above private key into metamask, and then change network to Foundry (chain id 31337).
Devland also sets up some configuration files for the dev network. They are in the same format as production for ease of integration:
dev-ctx/EulerChains.json
- A chain manifest in the same format as EulerChains.jsondev-ctx/labels/31337/products.json
- Aproducts.json
in the same format as euler-labelsdev-ctx/addresses/31337/CoreAddresses.json
- Address files in the same format as euler-interfacesdev-ctx/priceapi/31337/prices.json
- A sample output from the prices API.
For now, this repo also contains some lens code, until it can find a better home. To deploy, put a WALLET_PRIVATE_KEY
into .env
and then run:
forge script ./script/DeployMaglevLens.s.sol --rpc-url $RPC_URL --broadcast --slow