{"id":16031854,"url":"https://github.com/dckc/ibc-lab","last_synced_at":"2026-02-16T16:02:29.741Z","repository":{"id":43467874,"uuid":"455303359","full_name":"dckc/ibc-lab","owner":"dckc","description":"experiments with IBC","archived":false,"fork":false,"pushed_at":"2022-04-22T18:47:37.000Z","size":21,"stargazers_count":1,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-24T12:24:43.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dckc.png","metadata":{"files":{"readme":"README-IBC.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-03T19:39:42.000Z","updated_at":"2022-02-24T01:47:03.000Z","dependencies_parsed_at":"2022-09-23T04:02:27.754Z","dependency_job_id":null,"html_url":"https://github.com/dckc/ibc-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dckc/ibc-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fibc-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fibc-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fibc-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fibc-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dckc","download_url":"https://codeload.github.com/dckc/ibc-lab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dckc%2Fibc-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278787607,"owners_count":26045781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T21:06:22.926Z","updated_at":"2025-10-07T14:17:47.865Z","avatar_url":"https://github.com/dckc.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"I got my relayer to relay an IBC payment from the cosmos testnet to our devnet!\n\n![15.00 Photon in my wallet](https://www.diigo.com/file/image/brpqocpzpbeerecapzepbqeqpq/SwingSet+Solo+REPL+Demo.jpg)\n\n\n## Starting a hermes relayer between cosmos and agoric testnets\n\n_Grab the Makefile etc. by, for example, cloning this gist. Then:_\n\n 1. `make task/restore-keys` to:\n    - build a docker image for the [Hermes IBC Relayer CLI](https://github.com/informalsystems/ibc-rs/tree/master/relayer-cli) (v0.9.0)\n    - create a docker volume for the state\n    - generate a mnemonic; import (\"recover\") secrets for accounts on both chains\n 2. **Update `ADDR_AG`, `ADDR_COSMOS` in `Makefile`** with the addresses from step 1.\n 3. `make task/tap-agoric-faucet`; follow instructions to tap the faucet; then `touch task/tap-agoric-faucet`\n 3. `make task/create-channel` to:\n    - tap cosmos faucet\n    - create an IBC channel\n 4. Take note of the channel ids (details below)\n 5. `make start` or `docker-compose up -d` to start the relayer.\n\nCreating the IBC channel results in something like this that includes the channel ids:\n\n```\n2021-12-06T21:43:16.791053Z DEBUG ThreadId(01) do_chan_open_finalize for src_channel_id: channel-43, dst_channel_id: channel-3\nSuccess: Channel {\n    ordering: Unordered,\n    a_side: ChannelSide {\n        chain: ProdChainHandle {\n            chain_id: ChainId {\n                id: \"cosmoshub-testnet\",\n                version: 0,\n            },\n            runtime_sender: Sender { .. },\n        },\n        client_id: ClientId(\n            \"07-tendermint-54\",\n        ),\n        connection_id: ConnectionId(\n            \"connection-46\",\n        ),\n        port_id: PortId(\n            \"transfer\",\n        ),\n        channel_id: Some(\n            ChannelId(\n                \"channel-43\",\n            ),\n        ),\n    },\n    b_side: ChannelSide {\n        chain: ProdChainHandle {\n            chain_id: ChainId {\n                id: \"agoricdev-6\",\n                version: 6,\n            },\n            runtime_sender: Sender { .. },\n        },\n        client_id: ClientId(\n            \"07-tendermint-5\",\n        ),\n        connection_id: ConnectionId(\n            \"connection-5\",\n        ),\n        port_id: PortId(\n            \"transfer\",\n        ),\n        channel_id: Some(\n            ChannelId(\n                \"channel-3\",\n            ),\n        ),\n    },\n    connection_delay: 0ns,\n    version: Some(\n        \"ics20-1\",\n    ),\n}\n```\n\n## Provision user account on agorictest-6\n\nNormally [Setting up an Agoric Dapp Client with docker compose](https://github.com/Agoric/agoric-sdk/wiki/Setting-up-an-Agoric-Dapp-Client-with-docker-compose) would suffice, but:\n\n**ISSUE**: needs `home.pegasusConnections` special power due to\nhttps://github.com/Agoric/agoric-sdk/issues/4153\n\nI don't have good notes on how I did this... `agoric start --devnet`? Anyway... the address is\n\n`agoric18kzgpc36eacsdhx8wrdjywvdu3s6dsg2ae3t54`\n\n\n## Create peg and import issuer\n\n\nUsing [contract/src/deploy-peg.js](https://github.com/Agoric/agoric-sdk/blob/ibc-example-scripts/packages/pegasus/scripts/deploy-peg.js) based on `pegasus/demo.md`:\n\n\n```\n$ agoric deploy contract/src/deploy-peg.js\nOpen CapTP connection to ws://127.0.0.1:8000/private/captp...o\nagoric: deploy: running /home/connolly/projects/agoric/ibc-fun/contract/src/deploy-peg.js\nagoric: deploy: Deploy script will run with Node.js ESM\nawaiting home...\nawaiting pegasusConnections...\npegasusConnections: 11\ngetting instance, publicFacet\ncreating peg-channel-10-uphoton from /ibc-port/transfer/unordered/ics20-1/ibc-channel/channel-10\nawait brand, issuer, board...\n{ issuerBoardId: '495234043' } {\n  cosmos: { keyword: 'Photon', denom: 'uphoton', decimalPlaces: 6 },\n  agoric: { channel: 'channel-10' }\n}\n```\n\nmostly follow pegasus/demo.md (IOU details)\n\ncreate purse\n\ntrick: set auto-deposit in REPL\n\n## Set up keplr\n\nimport both chains using wallet.agoric.app\n\n## Send payment with keplr\n\n - start on cosmos hub testnet\n - ibc transfer\n - create channel to agoricdev-6 (@@src channel from above)\n - payee from agoric wallet\n\nhermes relayer logs say:\n\n```\n2021-12-05T00:20:23.118936Z DEBUG ThreadId(30) [agoricdev-6:transfer/channel-2 -\u003e cosmoshub-testnet] confirmed after 5.102978009s: TxHashes: count=1; 410AD46232C10FB7062B778F94C587238CA45B51EA8BA1A78DD47AC742EF4237\n...\n2021-12-05T00:20:23.194817Z TRACE ThreadId(24) extracted ibc_client event UpdateClient(UpdateClient { common: Attributes { height: Height { revision: 6, height: 28785 }, client_id: ClientId(\"07-tendermint-3\"), client_type: Tendermint, consensus_height: Height { revision: 0, height: 502622 } }, header: Some(Tendermint( Header {...})) })\n```\n\nWe can look at the transaction and see the details:\n\n`ag-cosmos-helper --node http://139.59.8.130:26657 query tx 410AD46232C10FB7062B778F94C587238CA45B51EA8BA1A78DD47AC742EF4237` shows:\n\n```\n    - key: packet_data\n      value: '{\"amount\":\"16000000\",\"denom\":\"uphoton\",\"receiver\":\"agoric18kzgpc36eacsdhx8wrdjywvdu3s6dsg2ae3t54\",\"sender\":\"cosmos18hcdewnyhl6hj6wkz2dwq8slfh8vrnetzxy33p\"}'\n```\n\n## Payment shows up in agoric wallet\n\nSee screenshot above.\n\n## IBC Send using Zoe Offers\n\n```\n$ agoric deploy contract/src/deploy-ibc-send.js\nOpen CapTP connection to ws://127.0.0.1:8000/private/captp...o\nagoric: deploy: running /home/connolly/projects/agoric/ibc-fun/contract/src/deploy-ibc-send.js\nagoric: deploy: Deploy script will run with Node.js ESM\nawaiting home...\nawait peg, instance...\nawait transferInvitation, brand, balance...\nawait payment... {\n  gross: { brand: Object [Alleged: Local10 brand] {}, value: 75000000n },\n  amount: { brand: Object [Alleged: Local10 brand] {}, value: 250000n }\n}\nawait result...\n{\n  result: undefined,\n  net: { brand: Object [Alleged: Local10 brand] {}, value: 74750000n }\n}\n```\n\n## Acknowledgements\n\nmost clues are from\n - [agoric-sdk pegasus/demo.md](https://github.com/Agoric/agoric-sdk/blob/master/packages/pegasus/demo.md)\n - [Agoric ↔ Pooltoy IBC Testnet [WIP]](https://hackmd.io/YYf5lsJXSSuatstpRDSs8g?view)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckc%2Fibc-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdckc%2Fibc-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckc%2Fibc-lab/lists"}