Dogecoin truth on DogeOS
Origin
Read Dogecoin from DogeOS contracts: balances, DRC-20 Coins, Doginal ownership, payments. Two-of-three signed, six confirmations deep.
Origin brings Dogecoin L1 truth to DogeOS. A DogeOS contract can ask, in one call, what is true on Dogecoin right now: a DOGE balance, a DRC-20 Coin balance, who owns a Doginal, whether an inscription is valid, whether a payment confirmed. Origin reads the chain through its own node and indexer, two of three attesters sign the answer, and the Origin contract checks the signatures before it stores anything. Start at origin.dogesoft.io (also ø.co); ready-made contracts are on plugs.dogesoft.io.
The contracts
| Contract | What it does |
|---|---|
Origin | Stores signed Dogecoin facts and serves free reads. Paid fresh facts on request. |
OriginPlugs | The plugs marketplace: list, buy and claim plugs, licenses, creator payouts. See Plugs marketplace. |
OriginEnvelope | Stateless helpers for the v1 inscription envelope: build bodies and compute envelopeHash on chain. |
OriginInscriber | Pay on DogeOS, get a v1 inscription on Dogecoin. See Origin Services. |
OriginAnchor | Pay on DogeOS, get up to 76 bytes stamped on Dogecoin in an OP_RETURN. See Origin Services. |
Network: DogeOS Chikyū testnet (chain id 6281971). Live addresses and
ABIs are always at https://origin.dogesoft.io/shared/abi/index.json;
until deployed is true there, nothing is live yet.
What you can rely on
- Two of three signatures. Every fact and every receipt needs two independent attester signatures (EIP-712, bound to the chain id and contract address). The contract will not accept fewer, ever: the floor is hard-coded.
- Six confirmations. Facts are anchored to a Dogecoin block at least six deep, and balances only count outputs that deep. Origin never over-counts. The floor is hard-coded too.
- Every answer says when. Each fact carries the Dogecoin height it was read at and when it was signed, so your contract decides how fresh is fresh enough.
- No surprise changes. Admin changes wait in a timelock and expire after 14 days if unused. Pausing is instant, for emergencies only.
Free reads
origin.dogeBalance(dogeAddress) // (koinu, l1Height, attestedAt)
origin.drc20Balance(dogeAddress, tick) // (amount, l1Height, attestedAt)
origin.collectionCount(dogeAddress, slug) // (count, l1Height, attestedAt)
origin.isInscriptionOwner(inscriptionId, dogeAddress)
origin.inscriptionValid(inscriptionId) // (ok, contentHash, l1Height)
origin.inscriptionMatches(inscriptionId, envelopeHash)
origin.drc20TransferValid(txid)
origin.txConfirmed(txid, minConfirmations)
origin.l1Tip() // latest Dogecoin height Origin has seen
Fresh facts (paid)
When the stored answer is too old for what you're doing, ask for a new one. It costs 0.05 DOGE per fact. If no one answers before the deadline, you take your fee back.
uint256 fee = origin.requestFee(keccak256("DRC20_BALANCE")); // 0.05 DOGE
uint256 id = origin.requestFact{value: fee}(
keccak256("DRC20_BALANCE"), origin.addressKey(dogeAddress), origin.tickKey("DU$T"), plugId);
// then POST { requestId, address, tick } to https://origin.dogesoft.io/api/attest/fulfill
Fact types: DOGE_BALANCE, DRC20_BALANCE,
DRC20_TRANSFER_VALID, COLLECTION_COUNT,
INSCRIPTION_OWNER, INSCRIPTION_VALID,
INSCRIPTION_ACTION, TX_INCLUDED.
Each request is one fact about one address, coin or inscription, not a list. Pass a
plugId and that plug's creator earns 20% of the fee
(how creators earn).
Attest API
The same signed facts over HTTP, free. Submit them to Origin yourself, or verify them off chain.
Base URL https://origin.dogesoft.io.
| Endpoint | Description |
|---|---|
GET /api/attest | Attester addresses, confirmations, available facts. |
GET /api/attest/doge-balance?address= | Confirmed DOGE balance. |
GET /api/attest/drc20-balance?address=&tick= | Confirmed DRC-20 Coin balance. |
GET /api/attest/collection-count?address=&collection= | How many Doginals of a collection the address holds. |
GET /api/attest/inscription-owner?id= | Current owner of a Doginal. |
GET /api/attest/inscription-valid?id= | Inscription exists, with its content hash. |
GET /api/attest/drc20-transfer-valid?txid= | A DRC-20 transfer was valid. |
GET /api/attest/tx-included?txid= | Transaction is in a block, six deep. |
GET /api/attest/op-return?txid= | The OP_RETURN bytes a transaction carries. |
GET /api/attest/zkp?txid= | OP_CHECKZKP data in a transaction, parsed (not verified yet). |
GET /api/attest/l1-tip | Signed Dogecoin tip. |
POST /api/attest/fulfill | Answer a paid fresh fact: { requestId, …inputs }. |
Origin answers questions about Dogecoin. It doesn't hold your coins, run a bridge or trade. Nothing in Origin can move anything on Dogecoin except the paid Origin Services you ask for.