diff --git a/test/README.md b/test/README.md index ce5c76c..34ac908 100644 --- a/test/README.md +++ b/test/README.md @@ -72,7 +72,9 @@ cast send $TOKEN_PROXY_ADDRESS "mint(address,uint256)" --r cast send $TOKEN_PROXY_ADDRESS "mintWithETH(address,uint256)" --value --rpc-url $RPC_URL --private-key $MINTING_ACCOUNT_PRIVATE_KEY --from $MINTING_ACCOUNT_ADDRESS ``` -**Note**: The `mintWithETH` function is public and can be called by anyone. It requires sending ETH with the transaction (using `--value`), which gets burned (sent to address(0)) as an economic cost for minting tokens. This provides a permissionless way to obtain tokens for testing without requiring minter privileges. +**Note**: The `mintWithETH` function is public and can be called by anyone. It requires sending ETH with the transaction +(using `--value`), which gets burned (sent to address(0)) as an economic cost for minting tokens. This provides a +permissionless way to obtain tokens for testing without requiring minter privileges. ### Approve the token for the waku-rlnv2-contract to use diff --git a/test/TestStableToken.sol b/test/TestStableToken.sol index 4c0be30..7c8f769 100644 --- a/test/TestStableToken.sol +++ b/test/TestStableToken.sol @@ -13,7 +13,6 @@ error AccountNotMinter(); error AccountAlreadyMinter(); error AccountNotInMinterList(); error InsufficientETH(); -error ETHTransferFailed(); contract TestStableToken is Initializable, @@ -66,8 +65,7 @@ contract TestStableToken is if (msg.value == 0) revert InsufficientETH(); // Burn ETH by sending to zero address - (bool success,) = payable(address(0)).call{ value: msg.value }(""); - if (!success) revert ETHTransferFailed(); + payable(address(0)).transfer(msg.value); _mint(to, amount); diff --git a/test/TestStableToken.t.sol b/test/TestStableToken.t.sol index 0f81719..59d8c5f 100644 --- a/test/TestStableToken.t.sol +++ b/test/TestStableToken.t.sol @@ -7,8 +7,7 @@ import { AccountNotMinter, AccountAlreadyMinter, AccountNotInMinterList, - InsufficientETH, - ETHTransferFailed + InsufficientETH } from "./TestStableToken.sol"; import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import { DeployTokenWithProxy } from "../script/DeployTokenWithProxy.s.sol";