Skip to content

Commit

Permalink
imp: changed openzeppelin-contracts to `openzeppelin-contracts-upgr…
Browse files Browse the repository at this point in the history
…adeable` (#238)
  • Loading branch information
srdtrk authored Jan 23, 2025
1 parent 5630461 commit 1794b93
Show file tree
Hide file tree
Showing 41 changed files with 1,073 additions and 1,218 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ on:
- '**.sol'
- '.github/workflows/e2e.yml'
- 'bun.lockb'

# Cancel the workflow if a new commit is pushed to the branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
FOUNDRY_PROFILE: ci
permissions:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ 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`. | ~187,000 | ~187,000 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~542,454 | ~626,315 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,441,372 | ~1,524,945 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~419,253 | ~503,015 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~476,804 | ~560,509 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~542,560 | ~626,421 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,393,000 | ~1,476,573 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~419,337 | ~503,099 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~476,844 | ~560,549 |
### Aggregated Packet Benchmarks
Expand All @@ -175,8 +175,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. | ~199,333 | ~192,760 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~105,451 | ~99,483 |
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~199,377 | ~192,802 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~105,472 | ~99,503 |
Note: These gas benchmarks are with Groth16.
Expand Down
95 changes: 29 additions & 66 deletions abi/IBCERC20.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "constructor",
"inputs": [
{
"name": "owner_",
"name": "ics20_",
"type": "address",
"internalType": "contract IICS20Transfer"
},
Expand All @@ -30,6 +30,32 @@
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "ESCROW",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "ICS20",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "allowance",
Expand Down Expand Up @@ -162,26 +188,6 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "symbol",
Expand Down Expand Up @@ -261,19 +267,6 @@
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Approval",
Expand All @@ -299,25 +292,6 @@
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
Expand Down Expand Up @@ -431,21 +405,10 @@
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"name": "IBCERC20Unauthorized",
"inputs": [
{
"name": "account",
"name": "caller",
"type": "address",
"internalType": "address"
}
Expand Down
76 changes: 1 addition & 75 deletions abi/ICS02Client.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"name": "initialize",
"inputs": [
{
"name": "owner_",
"name": "admin_",
"type": "address",
"internalType": "address"
}
Expand All @@ -200,26 +200,6 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "renounceRole",
Expand Down Expand Up @@ -293,19 +273,6 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "updateClient",
Expand Down Expand Up @@ -392,25 +359,6 @@
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleAdminChanged",
Expand Down Expand Up @@ -550,28 +498,6 @@
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "Unreachable",
Expand Down
Loading

0 comments on commit 1794b93

Please sign in to comment.