Skip to content

Commit

Permalink
use multicall
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Kanda <[email protected]>
  • Loading branch information
dai1975 committed Jun 17, 2024
1 parent 04af04e commit 8fa9925
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ go 1.21
replace (
// https://github.com/cosmos/cosmos-sdk/blob/v0.47.3/go.mod#L171-L182
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/datachainlab/ethereum-ibc-relay-chain => github.com/dai1975/ethereum-ibc-relay-chain v0.0.0-20240613015231-637855f1529f
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)

require (
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.2
github.com/hyperledger-labs/yui-relayer v0.5.3
github.com/hyperledger-labs/yui-relayer v0.5.4
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBS
github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/dai1975/ethereum-ibc-relay-chain v0.0.0-20240613015231-637855f1529f h1:tq+6iFeilJQN2xCt2oqZDafqxxtKFdnDgNwFUDnIN20=
github.com/dai1975/ethereum-ibc-relay-chain v0.0.0-20240613015231-637855f1529f/go.mod h1:9rJTxXmEFVw8VrHYbKSK7bIQk1PVJm8pzyAYknMNNqc=
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.2 h1:obAxG44znqLUY0wpsTeRrWlQ/A6ls0uYLL1USEM5nko=
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.2/go.mod h1:PdSsegkRJiMWVGq+afDtXKRKg4p8hnmR1Yj5BgXkit0=
github.com/datachainlab/ibc-mock-client v0.4.1 h1:FQfyFOodgnchCIicpS7Vzji3yxXDe4Jl5hmE5Vz7M1s=
github.com/datachainlab/ibc-mock-client v0.4.1/go.mod h1:2wGddiF2uHFhiMBpSskzKT/wA8naXi5DLoXt1KEZA1o=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -774,8 +774,8 @@ github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXM
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
github.com/hyperledger-labs/yui-relayer v0.5.3 h1:K7lcqkaqsGtpXImcz/cuClZsTtWCobLC9zh76KGzhP8=
github.com/hyperledger-labs/yui-relayer v0.5.3/go.mod h1:GeCb1dtZjtQdkBNw1L9+LAUHzNQQhQK+kkoOnZYffw0=
github.com/hyperledger-labs/yui-relayer v0.5.4 h1:yhvWI28Rcel55UsdmYWX0QE0W3P9aBSRetQh1k8VpZA=
github.com/hyperledger-labs/yui-relayer v0.5.4/go.mod h1:GeCb1dtZjtQdkBNw1L9+LAUHzNQQhQK+kkoOnZYffw0=
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
Expand Down
14 changes: 13 additions & 1 deletion tests/cases/eth2eth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ network:

.PHONY: test
test:
./scripts/fixture
$(MAKE) test-single
$(MAKE) test-multi

.PHONY: test-multi
test-multi:
./scripts/fixture multi
./scripts/init-rly
./scripts/handshake
./scripts/test-tx

.PHONY: test-single
test-single:
./scripts/fixture single
./scripts/init-rly
./scripts/handshake
./scripts/test-tx
Expand Down
17 changes: 13 additions & 4 deletions tests/cases/eth2eth/scripts/fixture
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -eux

ARG1=$1

DOCKER=docker
SCRIPT_DIR=$(cd $(dirname $0); pwd)
FIXTURES_DIR=${SCRIPT_DIR}/../fixtures
Expand All @@ -26,8 +28,15 @@ mkdir -p "$CONF_DIR/chains"
for id in 0 1; do
IBC_HANDLER_ADDRESS=`cat ${FIXTURES_DIR}/ethereum/ibc${id}/addresses/IBCHandler`
MULTICALL3_ADDRESS=`cat ${FIXTURES_DIR}/ethereum/ibc${id}/addresses/Multicall3`
cat "$CONF_DIR/template/ibc-${id}.template.json" \
| jq ".chain.ibc_address |= \"$IBC_HANDLER_ADDRESS\"" \
| jq ".chain.multicall3_address |= \"$MULTICALL3_ADDRESS\"" \
> "$CONF_DIR/chains/ibc-${id}.json"
if [ "$ARG1" = "multi" ]; then
cat "$CONF_DIR/template/ibc-${id}.template.json" \
| jq ".chain.ibc_address |= \"$IBC_HANDLER_ADDRESS\"" \
| jq ".chain.multicall3_address |= \"$MULTICALL3_ADDRESS\"" \
> "$CONF_DIR/chains/ibc-${id}.json"
else
cat "$CONF_DIR/template/ibc-${id}.template.json" \
| jq ".chain.ibc_address |= \"$IBC_HANDLER_ADDRESS\"" \
| jq ".chain.multicall3_address |= null" \
> "$CONF_DIR/chains/ibc-${id}.json"
fi
done

0 comments on commit 8fa9925

Please sign in to comment.