Skip to main content

IBC transfers in apps

For app developers sending ICS-20 transfers from Safrochain. Relayer operators: Hermes setup.

Channels (mainnet)

DestinationSafrochain channelCounterparty
Noble (noble-1)channel-0channel-581
Osmosis (osmosis-1)channel-1channel-110497

Full list: IBC channels.

const sourcePort = 'transfer';
const sourceChannel = 'channel-1'; // Osmosis on mainnet
const timeoutTimestampNs = BigInt(Date.now() + 10 * 60 * 1000) * 1_000_000n;

const msg = {
typeUrl: '/ibc.applications.transfer.v1.MsgTransfer',
value: {
sourcePort,
sourceChannel,
token: { denom: 'usaf', amount: '1000000' },
sender,
receiver: 'osmo1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
timeoutTimestamp: timeoutTimestampNs,
memo: 'ibc test',
},
};

const res = await client.signAndBroadcast(sender, [msg], 'auto');

Testnet: confirm channel IDs on channels before shipping.

Failure modes

ErrorFix
channel not foundWrong sourceChannel
insufficient fundsFund sender with usaf
TimeoutIncrease timeoutTimestamp to 10–30 minutes

Next