Write to Dogecoin from L2
Origin Services
Pay on the Doge Soft L2 for a v1 inscription delivered to any Dogecoin address, or a 1 DOGE OP_RETURN stamp. Refundable if not done in time.
Origin Services let an L2 contract write to Dogecoin. Pay in DOGE on the Doge Soft L2 and Origin does the L1 work: a Doginal under the Inscription Standard, delivered to the Dogecoin address you name, or a short OP_RETURN stamp. Attesters re-read the result from Dogecoin before they sign a receipt, and your contract can be called back when it lands. If it isn't done by the deadline, you take your fee back.
Pricing
| Service | Price | Examples |
|---|---|---|
Inscription (OriginInscriber) | 2 DOGE + 0.0015 DOGE per byte | 1 KB β 3.5 DOGE Β· 1.4 KB β 4.1 DOGE |
OP_RETURN stamp (OriginAnchor) | 1 DOGE | Up to 76 bytes, e.g. a 32-byte hash |
Fresh fact (Origin) | 0.05 DOGE | See fresh facts |
Always read the live price on chain (previewFee) rather than hard-coding
it. A plug's creator earns 20% of every fee paid through their plug; Origin keeps the rest.
Inscribe from the Doge Soft L2
bytes memory body = envelope.launchMintBody("my-collection", "7", "100");
uint256 fee = inscriber.previewFee("LAUNCH_MINT", body.length);
(uint256 requestId, bytes32 envelopeHash) = inscriber.requestInscription{value: fee}(
"LAUNCH_MINT", "application/json", body, winnerDogeAddress, plugId);
// body = {"ds":{"action":"LAUNCH_MINT"},"slug":"my-collection","id":"7","max":"100"}
// optional: implement IOriginInscriptionReceiver to be told when it lands
function onInscribed(uint256 requestId, string calldata inscriptionId, bytes32 revealTxid, uint256 revealVout) external;
Verbs you can inscribe with (the body opens with that verb's ds tag), and their size limits:
| Verb | Content-type | Max size |
|---|---|---|
BUY / AUCTION_SOLD / OFFER_ACCEPT / GIFT / BUNDLE / PARTIAL_FILL / COLLECTION_TRANSFER | application/json | 1.4 KB |
LAUNCH_DEPLOY / LAUNCH_MINT | application/json | 1.4 KB |
ANCHOR | application/json | 1.4 KB |
Today each inscription is delivered in a single reveal, which carries about 1.4 KB of body (see payload size). The contracts accept at most 1,400 bytes per request.
Rules that keep it honest:
- Exactly what you paid for. The request commits to the hash of a plain Doginal: the content type and the body, ds tag included (
OriginEnvelope.envelopeHashOf(contentType, body)). Attesters reassemble the body from the reveal transaction on Dogecoin, re-hash it and only sign if it matches byte for byte and was delivered to your address. - Your verb is on chain. The body must open with the ds tag for the verb you paid for, e.g.
{"ds":{"action":"LAUNCH_MINT"},...}or{"ds":{"action":"BUY","ref":"..."},...}. Nothing else goes on chain: no ACTION or metadata pushes. - No DRC-20. Origin refuses
text/plainbodies, and Origin wonβt inscribe a DRC-20 body for Origin under any tag. Use lowercase content-types. - Refunds. Work only starts if there's time to finish before the deadline (24 hours from payment). If it isn't fulfilled by then, call
reclaim(requestId). - Protocol verbs stay closed. Internal protocol verbs (bridge, payouts, airdrops) can't be opened to anyone.
Stamp an OP_RETURN
For proofs that don't need an inscription: a leaderboard root, a document hash, a season seal. Origin
writes "ORA1" followed by your bytes (up to 76) in an OP_RETURN output.
bytes memory data = abi.encodePacked(keccak256(standings));
(uint256 requestId, bytes32 payloadHash) = anchor.requestAnchor{value: anchor.previewFee("PROOF")}("PROOF", data, plugId);
// later, anyone:
(bool ok, bytes32 txid, uint64 l1Height) = anchor.isAnchored(data);
Categories match the plug shelves: HOLDERS, DOGINALS,
COINS, PAYMENTS, IDENTITY,
PROOF. Every stamp is also findable in the
OP_RETURN index by its SHA-256 or by
?magic=ORA1.
Want this without writing the contract? Prize Forge (Doginal prizes) and Season Seal (leaderboard stamps) are ready-made plugs built on these two services.