Expand description
Stylus Hello World
The following contract implements the Counter example from Foundry.
contract Counter {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;
}
function increment() public {
number++;
}
}The program is ABI-equivalent with Solidity, which means you can call it from both Solidity and Rust.
To do this, run cargo stylus export-abi.
Note: this code is a template-only and has not been audited.