Skip to content

bmastc/lamina1-integration

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Lamina1 Chain Configuration and Integration Guide

Overview

Lamina1 is a custom Avalanche subnet using the Ethereum Virtual Machine (EVM). This guide provides essential information for integrating with the Lamina1 blockchain, including API endpoints, node setup, and other important details for exchange integration and wallet support.

Chainlist

All 4 Lamina1 Chains are on Chainlist

Lamina1 Mainnet Information

Lamina1 Testnet (Fuji) Information

Node Installation and Configuration

To run a Lamina1 node, follow the Avalanche subnet node installation documentation:

  • Node Installation Guide: Avalanche Subnet Node Installation
  • Disk Size Requirement: <50 GB is needed initially when only syncing the Lamina1 chain and the Avalanche P-Chain. <128 GB is probably safe for the next year or so. Avalanche recommends 1 TB SSD generally for validators.
  • Configuration Directory: Avalanche Node Configuration

Customizing RPC Port and Data Directory

API Information

Lamina1 supports standard EVM JSON-RPC methods and you can use the following public API endpoints:

Alternatively you can use libraries like ethers or web3.js that interact with EVM chains.

See the RPC API Instructions.md document for more detailed information.

Common API Methods

Get Account Balance

{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0xYourAccountAddress", "latest"],
    "id": 1
}
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xYourAccountAddress", "latest"],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Get Latest Block Number

{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
}
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Get Transaction by Hash

{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": ["0xYourTransactionHash"],
    "id": 1
}
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xYourTransactionHash"],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Verify Transaction Receipt

{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": ["0xYourTransactionHash"],
    "id": 1
}
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xYourTransactionHash"],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Note: status: "0x1" means the transaction was successful, while status: "0x0" means it failed.

Transfer Process

To transfer L1 tokens, you must sign the transaction offline and broadcast it online.

Sign Transaction Offline (using web3.js):

const Web3 = require('web3');
const web3 = new Web3();

const account = web3.eth.accounts.privateKeyToAccount('0xYourPrivateKey');

const tx = {
    to: '0xRecipientAddress',
    value: web3.utils.toWei('0.1', 'ether'),
    gas: 2000000
};

const signedTx = account.signTransaction(tx);

Broadcast Signed Transaction:

{
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": ["0xSignedTransactionData"],
    "id": 1
}
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xSignedTransactionData"],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Network Details

  • Block Producing Rate: Average block time ~2 seconds (blocks are only produced when there are transactions to process)
  • Transaction Precision: 18 decimal places
  • Address Format: Addresses begin with 0x followed by 40 alphanumeric characters

Wallet Information

Additional Information

  • Account Memo Function: EVM-based, similar to standard Ethereum accounts
  • Creating Account: Follow standard EVM account creation processes
  • Preventive Measures to Avoid Chain Forking: Not needed due to PoS mechanism
  • Restoring and Recovering Accounts: Use standard Ethereum account recovery methods (e.g., mnemonic phrases, private keys)
  • Cross-Chain Bridge: Not currently implemented; earliest possible date is June 15, 2024, subject to Open Metaverse Foundation (OMF) decision
  • Proof of Stake: Prevents 51% attacks inherently
  • Rollback Policy: No rollback
  • Transaction Timeout Mechanism: No timeout mechanism for transactions in the tx pool
  • Rent or Reservation: No rent or reservation requirements
  • Node IP Whitelisting: Not required

For further technical details, you can refer to the following resources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published