Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes for getting-started.md #258

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ contract MyToken is ERC20 {
Then you can write a `setUp()` function that creates a new token contract with a _symbolic_ initial supply, as follows:
```solidity
import {SymTest} from "halmos-cheatcodes/SymTest.sol";
import "forge-std/Test.sol";
import "./MyToken.sol";
cos marked this conversation as resolved.
Show resolved Hide resolved

contract MyTokenTest is SymTest {
contract MyTokenTest is SymTest, Test {
MyToken token;

function setUp() public {
Expand Down Expand Up @@ -104,7 +106,7 @@ Below is an example symbolic test for the token transfer function:
function check_transfer(address sender, address receiver, uint256 amount) public {
// specify input conditions
vm.assume(receiver != address(0));
vm.assume(token.balance(sender) >= amount);
vm.assume(token.balanceOf(sender) >= amount);
cos marked this conversation as resolved.
Show resolved Hide resolved

// record the current balance of sender and receiver
uint256 balanceOfSender = token.balanceOf(sender);
Expand Down
Loading