
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@xpla/contracts
Advanced tools
XPLA precompiled contract interfaces and types
XPLA precompiled contract interfaces and types for Solidity projects.
forge install xpladev/xplajs
After installation, create or add to your project's remappings.txt file:
@xpla/contracts/=lib/xplajs/contracts/
Note: You need to create this file in your Forge project root directory, not in this package.
npm install @xpla/contracts
# or
yarn add @xpla/contracts
import "@xpla/contracts/interfaces/IAuth.sol";
import "@xpla/contracts/common/Types.sol";
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Import precompiled contract interfaces
import "@xpla/contracts/interfaces/IAuth.sol";
import "@xpla/contracts/interfaces/IBank.sol";
contract MyContract {
// Use the imported interfaces
IAuth public auth;
IBank public bank;
constructor() {
// Initialize with precompiled contract addresses using constants from interfaces
auth = IAuth(IAuth.AUTH_PRECOMPILE_ADDRESS);
bank = IBank(IBank.BANK_PRECOMPILE_ADDRESS);
}
function getAccountInfo(address user) external view returns (string memory) {
return auth.account(user);
}
function getBalance(address user) external view returns (uint256) {
return bank.balanceOf(user);
}
}
IAuth - Authentication and account managementIBank - Banking and token operationsIWasm - CosmWasm contract supportStakingI - Staking operationsDistributionI - Distribution and rewardsIGov - Governance operationsISlashing - Slashing operationsBech32I - Bech32 address encoding/decodingThe package includes common type definitions used across contracts:
common/Types.sol - Shared types used across contractsutil/Types.sol - Utility-specific typesMIT
FAQs
XPLA precompiled contract interfaces and types
We found that @xpla/contracts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.

Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.