1

I want to create an Arbitrum Sepolia token. I tried to create Arbitrum Goerli token but everyone says Goerli is depricated.

Also, I was unable to faucet to goerli because they want 0.1 ETH on the mainnet. Maybe I can somehow bypass this?

So, I bridget 0.2 eth to my Arbitrum Sepolia Metamask and opened remix to execute smartcontract to create my token.

Here is my code:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract Test123 is ERC20{
    constructor() ERC20("Test123", "T123"){
         _mint(msg.sender,10**18);
    }
}

I set gaslimit to 3000000 and value to 10000 gwei (not sure why I should do it).

Then I click deploy and got this

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? 
Returned error: {"jsonrpc":"2.0","error":"invalid opcode: PUSH0","id":1900855403804852}

If I click proceed - I got the this error: intrinsic gas too low

What am I doing wrong?

1 Answer 1

2

As of right now, Arbitrum doesn't yet support PUSH0. See Arbitrum docs: Solidity support.

To actually deploy your ERC20 token with Remix+MetaMask, you need to change the Solidity compiler to 0.8.19. Make sure you change it in the token code (pragma) and in the Remix Solidity compiler too on the Compile tab.

Once you do this and hit Compile, it will pull in all the OpenZeppelin ERC20 dependencies and will give you errors as they all require 0.8.20+. What you'll need to do is just click through the errors in the Remix interface and in the Solidity code of each of the dependency contracts that show up in your Remix, change 0.8.20 to 0.8.19. Then compile your Test123 contract again and deploy it on Arbitrum. It'll work this time since it's 0.8.19.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.