How to use the shard node
Testing Contracts
To ensure your smart contracts function as intended, you can use the Stylus demos available in the adventure-layer-l2-scripts repository on GitHub. These demos provide practical examples and testing scenarios to validate your contracts.
Steps to Test Your Contracts
-
Clone the Repository: First, clone the adventure-layer-l2-scripts repository to your local machine:
git clone https://github.com/AdventureGoldDao/adventure-layer-l2-scripts.git
-
Initialize the Environment: Navigate to the
stylus-demos
directory and set up your environment:cd adventure-layer-l2-scripts/stylus-demos cp ./scripts.env.example .env
-
Deploy the Contract: Use the provided script to deploy your contract:
./scripts/deploy.sh
-
Test the ERC20 Contract: Run the test script to validate the ERC20 contract:
./scripts/test-erc20.sh
-
Get Contract ABI: Retrieve the contract ABI using the script provided:
./scripts/abi.sh
Was this page helpful?