
Modification of Kode Sherpa Contract
In my previous article Generating Unit Tests From Kode Sherpa I discussed about unit tests generation and generated unit tests as approx 9 tests were failing so in this article we will now modify the test to foundry and then compile in foundry so that we can analyze that if the generated smart contract is adhering error free compilation from Kode Sherpa. The test suite created looking at hardhat in foundry // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; import "forge-std/Test.sol"; // -------------------------------------------------- // Minimal MockERC20 (self-contained) // -------------------------------------------------- contract MockERC20 { string public name = "MockToken"; string public symbol = "MTK"; uint8 public decimals = 18; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; function mint(address to, uint256 amount) external { balanceOf[to] += amount; } function approve(address spender, uint256 amou
Continue reading on Dev.to
Opens in a new tab



