Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ics-20 transfer instead of MockApp #5

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/datachainlab/ethereum-ibc-relay-chain v0.2.3
github.com/datachainlab/ethereum-ibc-relay-prover v0.2.1
github.com/datachainlab/lcp-go v0.1.1
github.com/hyperledger-labs/yui-relayer v0.4.5
github.com/hyperledger-labs/yui-relayer v0.4.6-0.20231009102815-b0552592fb73
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,8 @@ github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7
github.com/huin/goupnp v1.1.0 h1:gEe0Dp/lZmPZiDFzJJaOfUpOvv2MKUkoBX8lDrn9vKU=
github.com/huin/goupnp v1.1.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o=
github.com/hyperledger-labs/yui-relayer v0.4.5 h1:zHsDr3Bvg67TT6aN5T92BnG0QnjkdY/gam+xOXqVNXI=
github.com/hyperledger-labs/yui-relayer v0.4.5/go.mod h1:SlZX1TxfN6d3OCKv7fdki1tmRQg0h/GArJL+QYDD+DY=
github.com/hyperledger-labs/yui-relayer v0.4.6-0.20231009102815-b0552592fb73 h1:seLa+ij6bTr8MHNBW3hre4g7jX8RuqANmXMqYLYOlP8=
github.com/hyperledger-labs/yui-relayer v0.4.6-0.20231009102815-b0552592fb73/go.mod h1:SlZX1TxfN6d3OCKv7fdki1tmRQg0h/GArJL+QYDD+DY=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/cases/tm2eth/configs/path.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"client-id": "lcp-client-0",
"connection-id": "connection-0",
"channel-id": "channel-0",
"port-id": "mockapp",
"port-id": "transfer",
"order": "unordered",
"version": "mockapp-1"
"version": "ics20-1"
},
"dst": {
"chain-id": "ibc1",
"client-id": "lcp-client-0",
"connection-id": "connection-0",
"channel-id": "channel-0",
"port-id": "mockapp",
"port-id": "transfer",
"order": "unordered",
"version": "mockapp-1"
"version": "ics20-1"
},
"strategy": {
"type": "naive"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cases/tm2eth/scripts/test-tx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ retry() {

echo "!!! ibc0 -> ibc1 !!!"

docker exec -it tendermint-chain sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_USER_ADDRESS} --chain-id ibc0 mockapp send mockapp channel-0 msg0 --yes"
${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans 0xa89f47c6b463f74d87572b058427da0a13ec5425
sleep 5
retry 10 ${RLY} tx relay ibc01
sleep ${TX_INTERNAL}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ const MockClient = artifacts.require("@hyperledger-labs/yui-ibc-solidity/MockCli
const LCPProtoMarshaler = artifacts.require("@datachainlab/lcp-solidity/LCPProtoMarshaler");
const AVRValidator = artifacts.require("@datachainlab/lcp-solidity/AVRValidator");
const LCPClient = artifacts.require("@datachainlab/lcp-solidity/LCPClient");
const ERC20Token = artifacts.require("@hyperledger-labs/yui-ibc-solidity/ERC20Token");
const ICS20TransferBank = artifacts.require("@hyperledger-labs/yui-ibc-solidity/ICS20TransferBank");
const ICS20Bank = artifacts.require("@hyperledger-labs/yui-ibc-solidity/ICS20Bank");
const MockApp = artifacts.require("MockApp");

const PortMock = "mockapp"
const PortTransfer = "transfer"
const MockClientType = "mock-client"
const LCPClientType = "lcp-client"

Expand Down Expand Up @@ -39,11 +43,15 @@ module.exports = async (deployer) => {

await deployer.deploy(LCPClient, IBCHandler.address, rootCert, true);
await deployer.deploy(MockApp, IBCHandler.address);
await deployer.deploy(ERC20Token, "simple", "simple", 1_000_000_000_000);
await deployer.deploy(ICS20Bank)
await deployer.deploy(ICS20TransferBank, IBCHandler.address, ICS20Bank.address);

const ibcHandler = await IBCHandler.deployed();

for(const f of [
() => ibcHandler.bindPort(PortMock, MockApp.address),
() => ibcHandler.bindPort(PortTransfer, ICS20TransferBank.address),
() => ibcHandler.registerClient(MockClientType, MockClient.address),
() => ibcHandler.registerClient(LCPClientType, LCPClient.address)
]) {
Expand Down
Loading