I am trying to deploy a contract on Arbitrum testnet using Infura as web3 provider.
In my profile with Infura I added Arbitrum as a network.
Then I do
const url ='https://arbitrum-rinkeby.infura.io/v3/my_project_id'
const web3Provider = new Web3.providers.HttpProvider(url);
However, when trying to deploy , I am getting error
Error: Chain with name arbitrum-rinkeby not supported
The same error happens if I just use "arbitrum" instead of arbitrum-rinkeby.
What is going on?
EDIT: here is the code I use for deployment
web3.eth.getTransactionCount(addr, (err,txCount) => {
console.log("txCount=",txCount);
const txObject = {
nonce: web3.utils.toHex(txCount),
gasLimit: web3.utils.toHex(1500000),
gasPrice: web3.utils.toHex(100000000),
data: data.encodeABI()
}
const tx = new Tx(txObject,{chain:'arbitrum-rinkeby', hardfork: 'petersburg'});
tx.sign(key);
const serializeTx = tx.serialize();
const raw = '0x'+serializeTx.toString('hex');
web3.eth.sendSignedTransaction(raw).on('receipt', console.log);
})