@water-cooler-studios/monad-contracts-core
v2.3.0-dev.0
Published
Smart contracts and deployments for Monad
Keywords
Readme
Monad Contracts
Install Build Tools
curl -L https://foundry.paradigm.xyz | bash
foundryup
forge soldeer installBuild
forge buildTest
forge testDeploy contracts locally
- Open new terminal and run
anvil --code-size-limit 128000 - Create
.envfile (if not already present) from .env.local template - Change
.envfile if desired, currently configured with default anvil wallet - Deploy in separate terminal window with:
forge script DeployCore --rpc-url anvil --broadcast
Common commands
cast call $SMON "balanceOf(address)(uint256)" $ME
cast call $SMON "getAllUserUnlockRequests(address)((uint96,uint96,uint40,uint16)[])" $ME
cast send $SMON --private-key $PK "deposit(uint96,address)(uint96)" 0 $ME --value "1 ether"
cast send $SMON --private-key $PK "requestUnlock(uint96,uint96)(uint96)" "1 ether" 0
cast send $SMON --private-key $PK "redeem(uint256,address)(uint96)" 0 $ME
cast send $SMON --private-key $PK "submitBatch()"
cast send $SMON --private-key $PK "sweep(uint64[],uint8)" "[3]" 32
cast send $SMON --private-key $PK "compound(uint64[])" "[3]"Direct Staking Precompile Interactions
cast call 0x0000000000000000000000000000000000001000 "getDelegator(uint64,address)(uint256,uint256,uint256,uint256,uint256,uint256,uint256)" 3 $ME
cast send --private-key $PK 0x0000000000000000000000000000000000001000 "delegate(uint64)(bool)" 3 --value "0.1 ether"
cast send --private-key $PK 0x0000000000000000000000000000000000001000 "undelegate(uint64,uint256,uint8)(bool)" 3 "0.1 ether" 0
cast send --private-key $PK 0x0000000000000000000000000000000000001000 "withdraw(uint64,uint8)(bool)" 3 0