Docs · Build
Build on the chain
A program on Kalyx is ordinary software that reads this chain and submits type 0x2 transactions signed with ML-DSA-87. The public door is https://testnet.kalyx.si/api/rpc. Chain id is 21520. Addresses on that door are KAL plus 40 hex characters. A transaction hash stays 0x.
ecrecover. A contract that needs a secp256k1 signature will not get one from the Kalyx wallet. Prove a feature by deploying it and reading the receipt.Pin these numbers
| Name | Value |
|---|---|
| Chain id | 21520 (0x5410) |
| Fork version for a validator key | 0x10000038 |
| Slot | about 10 seconds |
| Epoch | 8 slots, about 80 seconds |
| Block gas limit | 30,000,000 |
| Starting base fee | 1 gwei. Read the live value. Do not hardcode it after genesis. |
| 1 KALYX | 1018 base units. Beacon stake is counted in gwei, and 1 KALYX is 109 of those. |
| Plain transfer gas | 21,000 |
| Transaction type | 0x2 |
| Compiler target | London, or Paris. No PUSH0. |
| Deposit contract | KAL4242424242424242424242424242424242424242 |
| Burn address | KAL000000000000000000000000000000000000dEaD |
| Public RPC | https://testnet.kalyx.si/api/rpc |
The public door sends Access-Control-Allow-Origin: * on the RPC path, so a browser page can call it. That does not make your node’s ports public. 8545, 8551, and 4000 stay on the machine that runs a node. Do not point a website at them.
Methods the public door answers
Use the qrl_ method names. A library that only speaks eth_ is speaking a different door. These are the calls a wallet and a contract page actually use:
qrl_chainIdshould return0x5410.qrl_blockNumberis the latest execution block. It does not jump when a beacon slot is empty.qrl_getBalancewith the account and"latest".qrl_getTransactionCountwith the account and"pending"before you sign.qrl_estimateGasfor a call that is more than a plain transfer.qrl_callfor a read. A read does not sign and does not spend gas on chain.qrl_sendRawTransactionfor signed bytes.qrl_getTransactionReceiptfor the status, gas used, contract address, and logs.qrl_getCodefor the bytecode at an address.
curl -s https://testnet.kalyx.si/api/rpc \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"qrl_chainId","params":[]}'
curl -s https://testnet.kalyx.si/api/rpc \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"qrl_getTransactionCount","params":["KAL_ADDRESS","pending"]}'
Pass the account as KAL plus 40 hex characters. The door accepts that label. A 20-byte value is what the node stores. The account page is the checksum rule.
Build a transaction
A type 0x2 transaction carries:
- chainId. 21520. Anything else must be refused by the wallet.
- nonce. The pending transaction count. Zero for a new account that has never sent.
- maxPriorityFeePerGas. The tip. Zero is allowed. The tip is paid to the proposer. It is not burned.
- maxFeePerGas. The ceiling. It has to cover the block base fee or the transaction should not enter.
- gasLimit. 21,000 for a plain transfer. Higher for a contract. Unused gas is not a second coin.
- to. The 20-byte recipient. Empty when the transaction is a deploy.
- value. Base units. Multiply KALYX by 1018.
- data. Call data, or the init bytecode of a deploy.
The signature is ML-DSA-87 from the 51-byte seed, over the signing hash of those fields. It is not r, s, and v. A seed of any other length is refused. The wallet does this. A program you write has to do the same checks before it asks the user to confirm.
An older transaction type is rejected. The node does not rewrite it into type 0x2. A signature for another chain id is rejected. A nonce that has already been used is rejected.
Deploy and call
Compile for London. Solidity 0.8.20 and later emit PUSH0 if you leave the compiler on a newer default. PUSH0 is outside what these pages produce. Paris adds no opcode after London, so a Paris target is also free of PUSH0. Shanghai is not.
The workshop at testnet.kalyx.si/workshop compiles one file in the browser. An import has nowhere to go. Paste the whole contract. The wallet Write tab loads Solidity 0.8.26. The workshop loads 0.8.38. pragma solidity ^0.8.20 compiles on both. The Write tab refuses bytecode over 24,000 bytes and contract data over 60,000 bytes. A constructor with arguments is filled in on the workshop. The Write tab wants an empty constructor.
A deploy is a type 0x2 transaction with bytecode and no recipient. The receipt’s contract address is the new account, shown as KAL. A state-changing call sets to to that address and data to the function selector plus the arguments. msg.sender inside the contract is the spending account that signed. msg.value is the base units you attached. block.chainid is 21520.
A read uses qrl_call. It does not create a transaction, does not move the nonce, and does not sign. The contracts page has a box contract and a badge NFT that mint and transfer through msg.sender.
Tokens, NFTs, and the calls that will not work
An ERC-20-shaped contract is a mapping, a balance, and transfer / transferFrom checked against msg.sender. An NFT is the badge on the contracts page: ownerOf, mint, transfer. Neither needs a Kalyx keyword.
Permit will not work with this wallet. Permit asks for a second signature, separate from the transaction, and then recovers a secp256k1 signer. This wallet signs the transaction only. ecrecover is not verified here. Do not document a precompile these pages do not list, and do not ship a contract whose safety depends on one, until you have deployed it and the call has succeeded.
To take a token or an NFT out of circulation, transfer it to KAL000000000000000000000000000000000000dEaD. No key was created for that address. The transfer does not reduce the protocol’s counted supply. The fee burn is a different rule.
Receipts and logs
Poll qrl_getTransactionReceipt with the transaction hash. A missing receipt means the transaction is not in a block yet. status says whether the call reverted. gasUsed is what the base fee is multiplied by. contractAddress is set for a deploy. logs are the events the contract emitted. The explorer shows those logs. It does not prove your source matches the bytecode. The code bytes from qrl_getCode are the code that ran.
There is no public trace API on the door these pages tell you to use. The receipt is the record you can rely on.
Fees your users will actually pay
Counted supply starts at 500,000,000 KALYX. That number is the floor. Base fees can burn only the coins an ergon has minted above it. Until that happens, the base fee of a transaction is returned to the sender. The tip still goes to the proposer. After erga mint, the burn can eat those new coins back down to 500,000,000 and then it stops. Held balances are not taxed. Read the fees page before you hardcode a “burn” in a user interface.
What a follower node changes for you
A program can talk to http://127.0.0.1:8545 on a machine you run. That socket is not for the public internet. The methods are the same family. The node page is how that machine syncs. It does not give your program a validator key. Publishing a contract does not make you a proposer.
If you already initialized an older genesis with this same chain id, delete the node data and download the current genesis.json, genesis.ssz, config.yaml, and bootnode.txt from the explorer. The chain id alone does not make the old files match.