You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function test_RevertUnSafeContractReceiver() public {
vm.etch(address(1), bytes("mock code"));
vm.expectRevert(bytes(""));
nft.mintTo{value: 0.08ether}(address(1));
}
FAIL. Reason: Etch cannot be used on precompile addresses (N < 10). Please use an address bigger than 10 instead] test_RevertUnSafeContractReceiver() (gas: 3548)
Change this into below codes will solve the problem.Please make the change to the documentation.
function test_RevertUnSafeContractReceiver() public {
vm.etch(address(11), bytes("mock code"));
vm.expectRevert(bytes(""));
nft.mintTo{value: 0.08ether}(address(11));
}
[PASS] test_SafeContractReceiver() (gas: 272635)
The text was updated successfully, but these errors were encountered:
When running the test from creating an NFT with Solmate, I ran into this problem
Change this into below codes will solve the problem.Please make the change to the documentation.
The text was updated successfully, but these errors were encountered: