Deploy a smart contract

AUREN runs an Ethereum-compatible virtual machine, so the tools you already know work.

Connect your tools

DevnetTestnetMainnet
RPC URLhttps://devnet.auren.im/rpchttps://testnet.auren.im/rpchttps://mainnet.auren.im/rpc
Chain ID770017700277000
CurrencyAURAURAUR

In MetaMask: add a network with the RPC URL and chain ID above. Your Ethereum address (0x…) is also an AUREN account, so a key you use on Ethereum works here.

Units

An EVM account balance is shown in wei. 1 AUR = 10^18 wei in the EVM, and 1 AUR = 10^9 sparks natively. The conversion is automatic: tools see 18 decimals.

Hardhat

// hardhat.config.js
module.exports = {
  solidity: '0.8.20',
  networks: { auren: { url: 'https://devnet.auren.im/rpc', chainId: 77001, accounts: [process.env.KEY] } },
};
npx hardhat run scripts/deploy.js --network auren

ethers

const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('https://devnet.auren.im/rpc', 77001);
const signer = new ethers.Wallet(process.env.KEY, provider);
const factory = new ethers.ContractFactory(abi, bytecode, signer);
const contract = await factory.deploy();
await contract.waitForDeployment();

Fund the address first by sending it AUR from a wallet (an Ethereum address works as an AUREN account).

From the command line

aurenctl evm deploy --data @contract.bin --from me
aurenctl evm call 0xCONTRACT --data 0xCALLDATA
aurenctl evm send 0xCONTRACT --data 0xCALLDATA --value 1 --from me

What is supported

AUREN runs the Shanghai version of the Ethereum virtual machine. The standard precompiled contracts 1 to 5 and 9 are available; the pairing-curve precompiles (6 to 8) are not. The interpreter was compared against the reference implementation on thousands of programs. Details and limits: EVM.

Fees

A contract call pays for the gas it uses, in AUR, at the current fee level. The wallet or tool estimates gas for you (eth_estimateGas). Unused gas is refunded. Fees are burned.

Tips

Edit this page on GitHub