+
Skip to content

Analog-Labs/oats

Repository files navigation

OATS: Omnichain Analog Token Standard

Spec

See:

Docs

To generate Solidity docs as an mdbook, run:

forge doc -b

Token Guide

(If you want to make you token omni-chain):

Implement (either one of, or both) the following interface(s) in your token contract:

  • ISender if you want your token be cross-chain transferrable.
    See TokenSender example for reference implementation, along with its test.

  • ISenderCaller if you want your token be cross-chain transferrable and call some external contract on the destination network upon such a transfer delivery.
    See TokenSenderCaller example for reference implementation, along with its test.

Integration Guide

(If you want your contract be called upon x-chain token transfer):

Implement ICallee interface in your contract. The onTransferReceived() callback function will be called by GMP Gateway once the tokens are delivered to target network.

Important

The caller of onTransferReceived() MUST be checked to be the token contract you want to integrate with.

Note

In case onTransferReceived() execution fails, GMP message is still considered delivered, and token transfer is not reverted. Caller contract emits specific events reflecting the callback execution outcome.

See Callee example contract in the test for reference implementation.

About

Omnichain Analog Token Standard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载