/*****************************************************
0000000 0000000
0001100 Crypts and Caverns x Realms 0001100
0001100 Lure Adventurers to their demise 0001100
0003300 0003300
*****************************************************/
This repository houses the code for our integration with Realms. If you're looking for the main Crypts and Caverns contracts which are already deployed, you'll find them here.
There are three main sections to the project:
contracts
- Contains all smart contracts and interfacesscripts
- Contains scripts to develop and ad hoc test. For example, mainnet/build.js
will deploy the staking contract, stake a dungeon, and verify that its owner is still correct.test
- Contains tests for our contracts. Most tests will be integration tests and we will likely have 'edge case' tests such as staking/unstaking 1000 dungeons at a time. TBD How we handle cross-chain tests from Mainnet->Starknet.Mainnet files are written in solidity and located in the mainnet
folder of each section.
We use hardhat to compile, test, and deploy contracts on the Ethereum blockchain.
Ethereum contracts end in .sol
and are housed in the ./contracts/mainnet
folder.
Installation
npm install
Build / Compile
Start a local node in one terminal: npm run node
Run the build script: npm run build
or npm run buildwatch
Test
npm run test
Deploy
*Uncomment out the 'deploy' lines in hardhat.config.js
npx hardhat deply --network rinkeby
Starknet is a Layer 2 that uses zkRollup technology to offer a low-gas, fast-transaction rollup built on top of ethereum. Transactions are batched and submitted to L1 over time.
Starknet uses the language 'Cairo' which is similar to Solidity but has its own quirks.
Starknet contracts end in .cairo
and are housed in the ./contracts/starknet
folder.
We use hardhat and the starknet-hardhat-plugin to compile and deploy Cairo contracts.
npm install
pip install starknet-devnet
pip install cairo-lang
For all of these on one line: npm install; pip install starknet-devnet; pip install cairo-lang
We use hardhat-starknet
to build and compile our Cairo contracts.
npm run nodestarknet
in a terminal to start a local node. This will listen for queries.npm run buildstarknet
in another terminal to compile and run cairo contracts.??? (Fill in when we get here)
npm run nodestarknet
in a terminal to start a local node. This will listen for queries.npm run teststarknet
in another terminal to compile and run tests.