10 · Documentation
Contracts
Testnet addresses, ABI downloads, and the full interface of every Ostrakon contract.
Ostrakon runs on Elysium testnet, chain id 99801. Gas is paid in HYPE.
Every contract is immutable. None has an owner, an admin role, a pause switch, or an upgrade path. What is deployed is what runs.
Addresses
Elysium testnet, chain id 99801. Deployed at block 25862428.
ABIs
- Shard.json
- Ekklesia.json
- Exile.json
- Walls.json
- Stele.json
- Treasury.json
- ExiledToken.json
- OstraToken.json
- OstraFaucet.json
- DemoRouter.json
- DemoPool.json
- DemoToken.json
Interfaces
The listings below are the external interface of each contract. Public constants are exposed as view functions with the same name.
Shard
The proposal, the bond, the snapshot, and the challenge. See Shard.
interface IShard {
event Proposed(
uint256 indexed shardId,
address indexed token,
address indexed proposer,
bytes32 balanceRoot,
uint256 snapshotBlock
);
event Challenged(uint256 indexed shardId, address indexed challenger, address holder);
event Opened(uint256 indexed shardId);
function CHALLENGE_PERIOD() external view returns (uint256); // 24 hours
function PROPOSER_BPS() external view returns (uint256); // 50, i.e. 0.5 %
function EXILE_MIN_BPS() external view returns (uint256); // 100, i.e. 1 %
function MAX_EXILES() external view returns (uint256); // 10
function bondAmount() external view returns (uint256);
function propose(address token, address[] calldata exiles, bytes32 balanceRoot)
external
returns (uint256 shardId);
function challenge(
uint256 shardId,
address holder,
uint256 statedBalance,
bytes32[] calldata proof
) external;
function open(uint256 shardId) external;
function shardCount() external view returns (uint256);
function activeShardOf(address token) external view returns (uint256);
function exilesOf(uint256 shardId) external view returns (address[] memory);
function isNamed(uint256 shardId, address account) external view returns (bool);
}
Ekklesia
The vote, the quorum, and finalization. See Ekklesia.
interface IEkklesia {
event Voted(uint256 indexed shardId, address indexed voter, bool support, uint256 weight);
event Finalized(uint256 indexed shardId, uint8 outcome);
function VOTING_PERIOD() external view returns (uint256); // 48 hours
function QUORUM_BPS() external view returns (uint256); // 2000, i.e. 20 %
function PASS_BPS() external view returns (uint256); // 6600, i.e. 66 %
function vote(uint256 shardId, bool support, uint256 balance, bytes32[] calldata proof) external;
function finalize(uint256 shardId) external;
function tally(uint256 shardId) external view returns (uint256 yes, uint256 no, uint256 quorum);
function hasVoted(uint256 shardId, address voter) external view returns (bool);
}
Exile
The forge and the claim. See Exile.
interface IExile {
event Forged(
uint256 indexed shardId,
address indexed oldToken,
address indexed newToken,
uint256 eligibleSupply
);
event Claimed(uint256 indexed shardId, address indexed account, uint256 amount);
function claim(
uint256 shardId,
uint256 snapshotBalance,
bytes32[] calldata proof,
uint256 amount
) external;
function isExiled(uint256 shardId, address account) external view returns (bool);
function newTokenOf(uint256 shardId) external view returns (address);
function claimed(uint256 shardId, address account) external view returns (uint256);
function totalClaimed(uint256 shardId) external view returns (uint256);
}
Walls
The sweep and the raise. See Walls.
interface IWalls {
event Swept(uint256 indexed shardId, uint256 oldSold, uint256 hypeOut);
event Raised(uint256 indexed shardId, address pool, uint256 hype, uint256 tokens, uint256 lpBurned);
function SWEEP_INTERVAL() external view returns (uint256); // 1 hours
function TWAP_PERIOD() external view returns (uint256); // 72 hours
function sweep(uint256 shardId) external;
function raise(uint256 shardId) external;
}
Stele
The public registry. See Stele.
interface IStele {
event Exiled(address indexed token, address indexed newToken, address indexed exile);
function isExiled(address account) external view returns (bool);
function exilesOf(address token) external view returns (address[] memory);
function tallyOf(uint256 shardId) external view returns (uint256 yes, uint256 no, uint256 quorum);
function exiledFromCount(address account) external view returns (uint256);
function recordCount() external view returns (uint256);
}
Treasury
The tithe and the buyback. See $OSTRA.
interface ITreasury {
event Sold(address indexed token, uint256 amount, uint256 hypeOut);
event BoughtBack(uint256 hypeIn, uint256 ostraBurned);
function sell(address newToken) external;
function buyback() external;
}
Calling order
| Step | Contract | Function | Who | When |
|---|---|---|---|---|
| 1 | Shard | propose | A holder with 0.5 % | Any time no Shard is active on the token |
| 2 | Shard | challenge | Anyone | Within 24 h of the proposal |
| 3 | Shard | open | Anyone | After 24 h |
| 4 | Ekklesia | vote | Each snapshot holder, once | Within 48 h of open |
| 5 | Ekklesia | finalize | Anyone | After 48 h |
| 6 | Exile | claim | Each eligible holder | Any time after forge |
| 7 | Walls | sweep | Anyone | At most hourly, once old tokens arrive |
| 8 | Walls | raise | Anyone | Once, 72 h after the first sweep |
| 9 | Treasury | sell | Anyone | At most hourly, once the new pool exists |
| 10 | Treasury | buyback | Anyone | Any time HYPE has accumulated |
Propose and claim each need an approval first: the bond in $OSTRA for propose, the old token for claim.