@ramestta/contracts
v1.1.0
Published
Contract ABIs and addresses for Ramestta Network L3 Blockchain
Maintainers
Readme
@ramestta/contracts
Contract ABIs and addresses for Ramestta Network L3 Blockchain.
Installation
npm install @ramestta/contractsUsage
Contract Addresses
import {
POLYGON_CONTRACTS,
RAMESTTA_CONTRACTS,
getPolygonContract,
getRamesttaContract
} from '@ramestta/contracts';
// Polygon L2 contracts (parent chain)
console.log(POLYGON_CONTRACTS.RootChain); // 0x32BC23e5FFf7D567313dB4F41A5125Ad9D9Bca63
console.log(POLYGON_CONTRACTS.StakeManager); // 0xc032E6C4D196CBf4CceddbA1d18661F7DD57f659
console.log(POLYGON_CONTRACTS.DepositManager); // 0x81ebFB0c73d3165c4719E9604cDa55eF91226dAf
// Ramestta L3 contracts (child chain)
console.log(RAMESTTA_CONTRACTS.MRC20); // 0x0000000000000000000000000000000000001010
console.log(RAMESTTA_CONTRACTS.ChildChain); // 0x0000000000000000000000000000000000001001ABIs
import {
MRC20_ABI,
ERC20_ABI,
ERC721_ABI,
STAKE_MANAGER_ABI,
ROOT_CHAIN_ABI,
DEPOSIT_MANAGER_ABI
} from '@ramestta/contracts';
import { ethers } from 'ethers';
// Create contract instance
const provider = new ethers.providers.JsonRpcProvider('https://blockchain.ramestta.com');
const mrc20 = new ethers.Contract(
'0x0000000000000000000000000000000000001010',
MRC20_ABI,
provider
);
// Call contract
const balance = await mrc20.balanceOf(userAddress);Network Configuration
import { NETWORKS, getNetwork, isRamesttaChainId } from '@ramestta/contracts';
// Get network config
console.log(NETWORKS.RAMESTTA_MAINNET);
// {
// chainId: 1370,
// name: 'Ramestta Mainnet',
// rpcUrl: 'https://blockchain.ramestta.com',
// explorer: 'https://ramascan.com',
// ...
// }
// Helper functions
const network = getNetwork(1370); // Returns RAMESTTA_MAINNET config
const isRama = isRamesttaChainId(1370); // trueAvailable Exports
Contract Addresses
| Export | Description |
|--------|-------------|
| POLYGON_CONTRACTS | All Polygon L2 contract addresses |
| RAMESTTA_CONTRACTS | All Ramestta L3 contract addresses |
ABIs
| Export | Description |
|--------|-------------|
| MRC20_ABI | Native RAMA token (MRC20) ABI |
| ERC20_ABI | Standard ERC20 ABI |
| ERC721_ABI | Standard ERC721 ABI |
| STAKE_MANAGER_ABI | StakeManager contract ABI |
| ROOT_CHAIN_ABI | RootChain contract ABI |
| DEPOSIT_MANAGER_ABI | DepositManager contract ABI |
Networks
| Export | Description |
|--------|-------------|
| NETWORKS | All network configurations |
| getNetwork(chainId) | Get network config by chain ID |
| isRamesttaChainId(chainId) | Check if chain ID is Ramestta |
| isPolygonChainId(chainId) | Check if chain ID is Polygon |
Contract Addresses Reference
Polygon L2 (Parent Chain - Chain ID: 137)
| Contract | Address | |----------|---------| | RootChain | 0x32BC23e5FFf7D567313dB4F41A5125Ad9D9Bca63 | | StakeManager | 0xc032E6C4D196CBf4CceddbA1d18661F7DD57f659 | | DepositManager | 0x81ebFB0c73d3165c4719E9604cDa55eF91226dAf | | WithdrawManager | 0x6e07F852bAC263492e8C710dB7c0d59275268db8 | | RamaToken | 0x55a5CC06801bBa4C030568f1A7ee1c753FDcbe36 |
Ramestta L3 (Child Chain - Chain ID: 1370)
| Contract | Address | |----------|---------| | MRC20 (Native RAMA) | 0x0000000000000000000000000000000000001010 | | ChildChain | 0x0000000000000000000000000000000000001001 | | StateReceiver | 0x0000000000000000000000000000000000001001 |
Related Packages
- @ramestta/sdk - Core SDK
- @ramestta/sdk-ethers - Ethers.js plugin
- @ramestta/sdk-web3 - Web3.js plugin
- @ramestta/sdk-react - React hooks
License
MIT
