Skip to content

Commit

Permalink
imp: removed unnecessary events (#126)
Browse files Browse the repository at this point in the history
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: srdtrk <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent 289d0cb commit e7df027
Show file tree
Hide file tree
Showing 17 changed files with 328 additions and 1,358 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ The following benchmarks are for a single packet transfer without aggregation.
| **Contract** | **Method** | **Description** | **Gas (groth16)** | **Gas (plonk)** |
|:---:|:---:|:---:|:---:|:---:|
| `ICS26Router.sol` | `sendPacket` | Initiating an IBC transfer with an `ERC20`. | ~205,000 | ~205,000 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~484,000 | ~563,000 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,422,000 | ~1,510,000 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~370,000 | ~448,000 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~458,000 | ~545,000 |
| `ICS26Router.sol` | `sendPacket` | Initiating an IBC transfer with an `ERC20`. | ~198,798 | ~198,798 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~518,409 | ~602,503 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,414,262 | ~1,497,617 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~397,928 | ~428,009 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~449,137 | ~532,397 |
### Aggregated Packet Benchmarks
Expand All @@ -174,8 +174,8 @@ Since there is no meaningful difference in gas costs between plonk and groth16 i
| **ICS26Router Method** | **Description** | **Avg Gas (25 packets)** | **Avg Gas (50 packets)** |
|:---:|:---:|:---:|:---:|
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~204,000 | ~197,000 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~116,000 | ~110,000 |
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~194,375 | ~187,866 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~101,630 | ~95,815 |
Note: These gas benchmarks are with Groth16.
Expand Down
38 changes: 0 additions & 38 deletions abi/IBCStore.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,25 +360,6 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "AckCommitted",
"inputs": [
{
"name": "path",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "commitment",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
Expand All @@ -398,25 +379,6 @@
],
"anonymous": false
},
{
"type": "event",
"name": "PacketCommitted",
"inputs": [
{
"name": "path",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "commitment",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "error",
"name": "IBCMultiPayloadPacketNotSupported",
Expand Down
127 changes: 127 additions & 0 deletions abi/ICS20Lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,111 @@
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "newMsgSendPacketV1",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "msg_",
"type": "tuple",
"internalType": "struct IICS20TransferMsgs.SendTransferMsg",
"components": [
{
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "memo",
"type": "string",
"internalType": "string"
}
]
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct IICS26RouterMsgs.MsgSendPacket",
"components": [
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "payloads",
"type": "tuple[]",
"internalType": "struct IICS26RouterMsgs.Payload[]",
"components": [
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "encoding",
"type": "string",
"internalType": "string"
},
{
"name": "value",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "toHexHash",
Expand Down Expand Up @@ -155,6 +260,28 @@
],
"stateMutability": "pure"
},
{
"type": "error",
"name": "ICS20InvalidAddress",
"inputs": [
{
"name": "addr",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "ICS20InvalidAmount",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "StringsInsufficientHexLength",
Expand Down
Loading

0 comments on commit e7df027

Please sign in to comment.