Socket
Book a DemoInstallSign in
Socket

@xpla/evm

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xpla/evm

TypeChain generated TypeScript interfaces for XPLA EVM smart contracts

1.8.0-rc.2
latest
@xpla/evm@1.8.0-rc.2
Source
npmnpm
Version published
Weekly downloads
6
-57.14%
Maintainers
4
Weekly downloads
 
Created
Source

@xpla/evm

TypeScript interfaces for XPLA EVM smart contracts generated by TypeChain.

Installation

npm install @xpla/evm
# or
yarn add @xpla/evm

Usage

Using in CommonJS environment

const { ethers } = require('ethers');
const { IBank__factory, IGov__factory } = require('@xpla/evm');

Using in ES Modules environment

import { ethers } from 'ethers';
import { IBank__factory, IGov__factory } from '@xpla/evm';

Basic Usage

import { ethers } from 'ethers';
import { 
  IBank__factory, 
  IGov__factory, 
  StakingI__factory,
  DistributionI__factory 
} from '@xpla/evm';

// Setup provider
const provider = new ethers.JsonRpcProvider('YOUR_RPC_URL');

// Create contract instances
const bankContract = IBank__factory.connect('CONTRACT_ADDRESS', provider);
const govContract = IGov__factory.connect('CONTRACT_ADDRESS', provider);
const stakingContract = StakingI__factory.connect('CONTRACT_ADDRESS', provider);
const distributionContract = DistributionI__factory.connect('CONTRACT_ADDRESS', provider);

// Call contract functions
const balance = await bankContract.balanceOf('WALLET_ADDRESS');
const proposals = await govContract.proposals(1);

Using with Signer

import { ethers } from 'ethers';
import { IBank__factory } from '@xpla/evm';

const provider = new ethers.JsonRpcProvider('YOUR_RPC_URL');
const signer = new ethers.Wallet('PRIVATE_KEY', provider);

const bankContract = IBank__factory.connect('CONTRACT_ADDRESS', signer);

// Send transaction
const tx = await bankContract.transfer('TO_ADDRESS', ethers.parseEther('1.0'));
await tx.wait();

Using Precompile Contracts

For convenience, you can use pre-connected precompile contracts:

import { ethers } from 'ethers';
import { 
  createPrecompileBank, 
  createPrecompileGov, 
  createPrecompileContracts 
} from '@xpla/evm';

const provider = new ethers.JsonRpcProvider('YOUR_RPC_URL');

// Create individual precompile contracts
const bankContract = createPrecompileBank(provider);
const govContract = createPrecompileGov(provider);

// Or create all precompile contracts at once
const contracts = createPrecompileContracts(provider);
const balance = await contracts.bank.balanceOf('WALLET_ADDRESS');
const proposals = await contracts.gov.proposals(1);

Included Interfaces

  • IAuth - Authentication related contracts
  • IBank - Bank/Token related contracts
  • IGov - Governance related contracts
  • StakingI - Staking related contracts
  • DistributionI - Distribution related contracts
  • ISlashing - Slashing related contracts
  • IWasm - CosmWasm related contracts
  • Bech32I - Bech32 encoding related contracts

Development

Build

npm run build

Type Check

npm run typecheck

License

MIT

Keywords

xpla

FAQs

Package last updated on 18 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.