0x-api-starter-guide-code
0x-api-starter-guide-code copied to clipboard
Update SimpleTokenSwap.sol
Fixed typos, worth also noting that require(sellToken.approve(spender, uint256(-1))); cant be used from >0.8.0. Users should declare a max constant as a member variable and pass that instead something like:
// as a member on the contract
uint256 public constant MASK = type(uint128).max;
....
require(sellToken.approve(spender, MASK), "approve failed");