Skip to main content
GET
fenine_getSystemContractABI
fenine_getSystemContractABI
curl --request GET \
  --url https://api.example.com/fenine_getSystemContractABI
{
  "result": "<string>"
}

Overview

Returns the complete ABI (Application Binary Interface) of the FenineSystem contract. Use this to create contract instances in your Web3 library.

Parameters

None

Response

result
string
JSON string containing the complete contract ABI

Examples

curl -X POST https://rpc.fene.app \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "fenine_getSystemContractABI",
    "params": [],
    "id": 1
  }'

Usage Pattern

1

Get ABI Once

Fetch the ABI once and cache it in your application
const abi = JSON.parse(await provider.send('fenine_getSystemContractABI', []));
2

Create Contract Instance

Use the ABI to create a contract instance
const contract = new web3.eth.Contract(abi, SYSTEM_CONTRACT_ADDRESS);
3

Call Contract Methods

Now you can call any contract method
const info = await contract.methods.getValidatorInfo(address).call();

Best Practices

The ABI is static and won’t change. Fetch it once during initialization and cache it.
// Bad: Fetching every time
async function getValidators() {
  const abi = JSON.parse(await web3.getSystemContractABI());
  const contract = new web3.eth.Contract(abi, address);
  return await contract.methods.getActiveValidators().call();
}

// Good: Cache and reuse
const ABI_CACHE = JSON.parse(await web3.getSystemContractABI());
const systemContract = new web3.eth.Contract(ABI_CACHE, address);

async function getValidators() {
  return await systemContract.methods.getActiveValidators().call();
}
In production, consider hardcoding the ABI or loading from a file to avoid RPC calls.
This ABI includes all functions: user functions (stake, claim), view functions (getValidatorInfo), and admin functions. Your wallet will only be able to call functions you have permission for.

fenine_getNFTPassportABI

Get NFT Passport contract ABI

fenine_getTaxManagerABI

Get Tax Manager contract ABI

fenine_getSystemContractAddress

Get System Contract address