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

feat(ics20): receive foreign tokens #25

Merged
merged 14 commits into from
Aug 13, 2024
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
# List your tests here
- TestWithIbcEurekaTestSuite/TestDeploy
- TestWithIbcEurekaTestSuite/TestICS20Transfer
- TestWithIbcEurekaTestSuite/TestICS20TransferNativeSdkCoin
- TestWithIbcEurekaTestSuite/TestICS20Timeout
name: ${{ matrix.test }}
runs-on: ubuntu-latest
Expand All @@ -69,4 +70,4 @@ jobs:
SP1_PRIVATE_KEY: ${{ secrets.SP1_PRIVATE_KEY }}
run: |
cd e2e/interchaintestv8
go test -v -mod=readonly . -run=${{ matrix.test }} -timeout 40m
go test -v -mod=readonly . -run '^${{ matrix.test }}$' -timeout 40m
110 changes: 75 additions & 35 deletions abi/ICS20Transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,28 +386,38 @@
"name": "packetData",
"type": "tuple",
"indexed": false,
"internalType": "struct ICS20Lib.UnwrappedFungibleTokenPacketData",
"internalType": "struct ICS20Lib.UnwrappedPacketData",
"components": [
{
"name": "erc20ContractAddress",
"type": "address",
"internalType": "address"
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
"name": "originatorChainIsSource",
"type": "bool",
"internalType": "bool"
},
{
"name": "sender",
"name": "erc20Contract",
"type": "address",
"internalType": "address"
},
{
"name": "sender",
"type": "string",
"internalType": "string"
},
{
"name": "receiver",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "memo",
"type": "string",
Expand All @@ -432,13 +442,23 @@
"name": "packetData",
"type": "tuple",
"indexed": false,
"internalType": "struct ICS20Lib.PacketDataJSON",
"internalType": "struct ICS20Lib.UnwrappedPacketData",
"components": [
{
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "originatorChainIsSource",
"type": "bool",
"internalType": "bool"
},
{
"name": "erc20Contract",
"type": "address",
"internalType": "address"
},
{
"name": "sender",
"type": "string",
Expand Down Expand Up @@ -472,28 +492,38 @@
"name": "packetData",
"type": "tuple",
"indexed": false,
"internalType": "struct ICS20Lib.UnwrappedFungibleTokenPacketData",
"internalType": "struct ICS20Lib.UnwrappedPacketData",
"components": [
{
"name": "erc20ContractAddress",
"type": "address",
"internalType": "address"
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
"name": "originatorChainIsSource",
"type": "bool",
"internalType": "bool"
},
{
"name": "sender",
"name": "erc20Contract",
"type": "address",
"internalType": "address"
},
{
"name": "sender",
"type": "string",
"internalType": "string"
},
{
"name": "receiver",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "memo",
"type": "string",
Expand All @@ -512,28 +542,38 @@
"name": "packetData",
"type": "tuple",
"indexed": false,
"internalType": "struct ICS20Lib.UnwrappedFungibleTokenPacketData",
"internalType": "struct ICS20Lib.UnwrappedPacketData",
"components": [
{
"name": "erc20ContractAddress",
"type": "address",
"internalType": "address"
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
"name": "originatorChainIsSource",
"type": "bool",
"internalType": "bool"
},
{
"name": "sender",
"name": "erc20Contract",
"type": "address",
"internalType": "address"
},
{
"name": "sender",
"type": "string",
"internalType": "string"
},
{
"name": "receiver",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "memo",
"type": "string",
Expand Down Expand Up @@ -624,34 +664,34 @@
},
{
"type": "error",
"name": "ICS20InvalidAmount",
"name": "ICS20DenomNotFound",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
"name": "denom",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "ICS20InvalidReceiver",
"name": "ICS20InvalidAddress",
"inputs": [
{
"name": "receiver",
"name": "addr",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "ICS20InvalidSender",
"name": "ICS20InvalidAmount",
"inputs": [
{
"name": "sender",
"type": "string",
"internalType": "string"
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
]
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions e2e/artifacts/genesis.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000012754500000000000000000000000000000000000000000000000000000000001baf800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000673696d642d310000000000000000000000000000000000000000000000000000",
"trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066b24dfc0a376dcfbf32aa896d68958779c5d6ef4c73b5f0eb8c55e74eaeb1399a9f8250b29f00b95808b8b596d78d77bbb1f263250537c5561baf2dc879ae5226c9ccd7",
"updateClientVkey": "0x0068b9d316aced51c5923b2d50692f4a6a9bfefcd89392914b90e77545727fbe",
"membershipVkey": "0x00a4245d249b5c35c9782cc899c8e370a35d5d928187dc9e7acbab7096764b72",
"ucAndMembershipVkey": "0x00cea834e3408d45d29080a3146e4fb1fd0c06503d655bd787219caac86cf59c"
"trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066b9eea063bcab1d2706362bf6a681e2d3290c2aabb5a4fb8bb1be180fde34c25bccd1af6d0f97857b6ffe08adeab2f8a4f8425638aa3d8d3eaeb59283abe81ab18417a7",
"updateClientVkey": "0x00ba8c461624efc02962f1fd9683d6576a73a3f126c5539832a725cc26071fba",
"membershipVkey": "0x00439c7d9afabe135aff8d86bae1e522beae2a66397fb27085233da1e45d0a02",
"ucAndMembershipVkey": "0x0065cb0619cfe50b6131a2cae2cad8ea153ef255fc3c6d0e83195ec4b64394cb"
}
Loading
Loading