diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6e66f48 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Foundry CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +env: + FOUNDRY_PROFILE: ci + +jobs: + check-solidity: + strategy: + fail-fast: true + + name: Foundry project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Run Forge build + run: | + forge --version + forge build --sizes + id: build + + - name: Run Forge tests + run: | + forge test -vvv + id: test \ No newline at end of file diff --git a/src/tokens/ERC20.sol b/src/tokens/ERC20.sol index 8746edb..a24c581 100644 --- a/src/tokens/ERC20.sol +++ b/src/tokens/ERC20.sol @@ -27,7 +27,7 @@ contract MultiChainNativeERC20 is ERC165Storage, ERC20, IERC6160Ext20 { /// @notice mapping of admins of defined roles mapping(bytes32 => mapping(address => bool)) _rolesAdmin; - constructor() ERC20("Multi Chain Native ERC20 TOken", "MCNT") { + constructor(string memory name, string memory symbol) ERC20(name, symbol) { _registerInterface(_IERC6160Ext20_ID_); _registerInterface(type(IERC5679Ext20).interfaceId); _registerInterface(type(IERC_ACL_CORE).interfaceId); diff --git a/test/ERC20.t.sol b/test/ERC20.t.sol index 96aaa18..afd3703 100644 --- a/test/ERC20.t.sol +++ b/test/ERC20.t.sol @@ -21,7 +21,7 @@ contract ERC20Test is Test { bytes32 constant BURNER_ROLE = keccak256("BURNER ROLE"); function setUp() public { - token = new MultiChainNativeERC20(); + token = new MultiChainNativeERC20("Multi Chain Native ERC20 TOken", "MCNT"); } function testNameSymbol() public {