Developers / Smart contracts

Smart contracts on KXCO Armature

KXCO Armature is EVM-compatible (Besu, London hard-fork rules). Anything that compiles to EVM bytecode runs unchanged. A few chain-specific quirks are worth knowing before you deploy.

Chain-specific quirks

  • Zero gas price. eth_gasPrice returns 0x0. Transactions still need a gas limit, but cost nothing in ARMR.
  • Instant finality. QBFT seals each block deterministically — there are no reorgs. tx.wait(1) is sufficient confirmation.
  • Permissioned. Writes require an account funded by a validator. Read access is open via the observer.
  • Block time ~5s. Don't rely on sub-second confirmations; design async flows around the block period.
  • No public mempool. The observer relays eth_sendRawTransaction to validators but does not expose pending tx via txpool_* to third parties.

Hardhat config

Add KXCO Armature as a network in hardhat.config.ts:

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
  solidity: "0.8.24",
  networks: {
    kxco: {
      url:      "https://chain.kxco.ai/rpc",
      chainId:  1111,
      gasPrice: 0,                              // chain is free
      accounts: [process.env.PRIVATE_KEY!],
    },
  },
};
export default config;

Deploy:

PRIVATE_KEY=0x... npx hardhat run scripts/deploy.ts --network kxco

Foundry config

foundry.toml:

[profile.default]
src      = "src"
out      = "out"
libs     = ["lib"]
solc     = "0.8.24"

[rpc_endpoints]
kxco = "https://chain.kxco.ai/rpc"

Deploy with forge create:

forge create src/MyContract.sol:MyContract \
  --rpc-url kxco \
  --private-key $PRIVATE_KEY \
  --legacy \
  --gas-price 0

--legacy is required because KXCO Armature runs in pre-EIP-1559 mode (no priority fee).

Deploy with ethers.js

import { ethers } from "ethers";
import fs from "fs";

const artifact = JSON.parse(fs.readFileSync("./out/MyContract.json", "utf8"));
const provider = new ethers.JsonRpcProvider("https://chain.kxco.ai/rpc");
const wallet   = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);

const factory  = new ethers.ContractFactory(artifact.abi, artifact.bytecode, wallet);
const contract = await factory.deploy(/* constructor args */);
await contract.waitForDeployment();

console.log("Deployed at:", await contract.getAddress());

Verifying a deployment

KXCO Armature doesn't run an Etherscan-compatible verifier yet. To prove a deployment, share the compiler version, optimizer settings, and source — anyone can recompile and compare bytecode against the on-chain code at your address using eth_getCode.

# Get deployed bytecode
curl -s -X POST https://chain.kxco.ai/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xCONTRACT","latest"],"id":1}'

Token standards

ERC-20, ERC-721, and ERC-1155 all work. KXCO Armature ships with one canonical token, ARMR, which is the native gas/settlement asset (decimals: 18). Tokenised assets issued on top of the chain are typically ERC-20 with additional permissioning (Knightsbridge issuers gate transfer via on-chain allowlists).

If you need help designing a tokenisation contract for a regulated asset, contact the Knightsbridge team — this isn't something you should freestyle for production.

More integration patterns at /docs (MetaMask, ethers, viem, web3.py). Full RPC surface at /developers/rpc.