Skip to content

Commit d570b00

Browse files
authored
chore: Check contracts upgradeability at the CI level (#403)
1 parent 2077e75 commit d570b00

20 files changed

Lines changed: 598 additions & 229 deletions

.github/workflows/smart-contracts.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,43 @@ jobs:
157157
- name: Install Foundry
158158
uses: foundry-rs/foundry-toolchain@v1
159159

160-
- name: Check contracts upgradeability
161-
run: pnpm run check:upgradeability:ci
160+
- name: Check contracts implementations
161+
run: pnpm run check:implementations
162+
163+
- name: Create Linea testnet env file
164+
run: |
165+
cp ./env/.env.linea-goerli .env
166+
echo INFURA_KEY=${{ secrets.INFURA_KEY }} >> .env
167+
168+
- name: Check contracts upgradeability on Linea testnet
169+
run: pnpm run check:upgradeability linea-goerli
170+
171+
- name: Create Linea mainnet env file
172+
run: |
173+
rm .env
174+
cp ./env/.env.linea .env
175+
echo INFURA_KEY=${{ secrets.INFURA_KEY }} >> .env
176+
177+
- name: Check contracts upgradeability on Linea mainnet
178+
run: pnpm run check:upgradeability linea
179+
180+
- name: Create Arbitrum testnet env file
181+
run: |
182+
rm .env
183+
cp ./env/.env.arbitrum-goerli .env
184+
echo INFURA_KEY=${{ secrets.INFURA_KEY }} >> .env
185+
186+
- name: Check contracts upgradeability on Arbitrum testnet
187+
run: pnpm run check:upgradeability arbitrum-goerli
188+
189+
- name: Create Arbitrum mainnet env file
190+
run: |
191+
rm .env
192+
cp ./env/.env.arbitrum .env
193+
echo INFURA_KEY=${{ secrets.INFURA_KEY }} >> .env
194+
195+
- name: Check contracts upgradeability on Arbitrum mainnet
196+
run: pnpm run check:upgradeability arbitrum
162197

163198
- name: Add upgradeability summary
164199
run: |

contracts/.env.example

Lines changed: 0 additions & 41 deletions
This file was deleted.

contracts/.openzeppelin/unknown-59140.json

Lines changed: 164 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"kind": "transparent"
2222
},
2323
{
24-
"address": "0xB2c4Da1f8F08A0CA25862509E5431289BE2b598B",
24+
"address": "0x65c8294C7aF0f0bDDe51eF92AF850613bb629fc6",
2525
"kind": "transparent"
2626
},
2727
{
28-
"address": "0x65c8294C7aF0f0bDDe51eF92AF850613bb629fc6",
28+
"address": "0xB2c4Da1f8F08A0CA25862509E5431289BE2b598B",
2929
"kind": "transparent"
3030
}
3131
],
@@ -3731,6 +3731,168 @@
37313731
},
37323732
"namespaces": {}
37333733
}
3734+
},
3735+
"68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": {
3736+
"address": "0xf9d736B0B006dC7c2EE340bFfd9f5EF226a37BD0",
3737+
"layout": {
3738+
"solcVersion": "0.8.21",
3739+
"storage": [
3740+
{
3741+
"label": "_initialized",
3742+
"offset": 0,
3743+
"slot": "0",
3744+
"type": "t_uint8",
3745+
"contract": "Initializable",
3746+
"src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63",
3747+
"retypedFrom": "bool"
3748+
},
3749+
{
3750+
"label": "_initializing",
3751+
"offset": 1,
3752+
"slot": "0",
3753+
"type": "t_bool",
3754+
"contract": "Initializable",
3755+
"src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68"
3756+
},
3757+
{
3758+
"label": "__gap",
3759+
"offset": 0,
3760+
"slot": "1",
3761+
"type": "t_array(t_uint256)50_storage",
3762+
"contract": "ContextUpgradeable",
3763+
"src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36"
3764+
},
3765+
{
3766+
"label": "_owner",
3767+
"offset": 0,
3768+
"slot": "51",
3769+
"type": "t_address",
3770+
"contract": "OwnableUpgradeable",
3771+
"src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22"
3772+
},
3773+
{
3774+
"label": "__gap",
3775+
"offset": 0,
3776+
"slot": "52",
3777+
"type": "t_array(t_uint256)49_storage",
3778+
"contract": "OwnableUpgradeable",
3779+
"src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94"
3780+
},
3781+
{
3782+
"label": "router",
3783+
"offset": 0,
3784+
"slot": "101",
3785+
"type": "t_contract(IRouter)7383",
3786+
"contract": "SchemaRegistry",
3787+
"src": "src/SchemaRegistry.sol:16"
3788+
},
3789+
{
3790+
"label": "schemas",
3791+
"offset": 0,
3792+
"slot": "102",
3793+
"type": "t_mapping(t_bytes32,t_struct(Schema)8757_storage)",
3794+
"contract": "SchemaRegistry",
3795+
"src": "src/SchemaRegistry.sol:18"
3796+
},
3797+
{
3798+
"label": "schemaIds",
3799+
"offset": 0,
3800+
"slot": "103",
3801+
"type": "t_array(t_bytes32)dyn_storage",
3802+
"contract": "SchemaRegistry",
3803+
"src": "src/SchemaRegistry.sol:20"
3804+
},
3805+
{
3806+
"label": "schemasIssuers",
3807+
"offset": 0,
3808+
"slot": "104",
3809+
"type": "t_mapping(t_bytes32,t_address)",
3810+
"contract": "SchemaRegistry",
3811+
"src": "src/SchemaRegistry.sol:22"
3812+
}
3813+
],
3814+
"types": {
3815+
"t_address": {
3816+
"label": "address",
3817+
"numberOfBytes": "20"
3818+
},
3819+
"t_array(t_bytes32)dyn_storage": {
3820+
"label": "bytes32[]",
3821+
"numberOfBytes": "32"
3822+
},
3823+
"t_array(t_uint256)49_storage": {
3824+
"label": "uint256[49]",
3825+
"numberOfBytes": "1568"
3826+
},
3827+
"t_array(t_uint256)50_storage": {
3828+
"label": "uint256[50]",
3829+
"numberOfBytes": "1600"
3830+
},
3831+
"t_bool": {
3832+
"label": "bool",
3833+
"numberOfBytes": "1"
3834+
},
3835+
"t_bytes32": {
3836+
"label": "bytes32",
3837+
"numberOfBytes": "32"
3838+
},
3839+
"t_contract(IRouter)7383": {
3840+
"label": "contract IRouter",
3841+
"numberOfBytes": "20"
3842+
},
3843+
"t_mapping(t_bytes32,t_address)": {
3844+
"label": "mapping(bytes32 => address)",
3845+
"numberOfBytes": "32"
3846+
},
3847+
"t_mapping(t_bytes32,t_struct(Schema)8757_storage)": {
3848+
"label": "mapping(bytes32 => struct Schema)",
3849+
"numberOfBytes": "32"
3850+
},
3851+
"t_string_storage": {
3852+
"label": "string",
3853+
"numberOfBytes": "32"
3854+
},
3855+
"t_struct(Schema)8757_storage": {
3856+
"label": "struct Schema",
3857+
"members": [
3858+
{
3859+
"label": "name",
3860+
"type": "t_string_storage",
3861+
"offset": 0,
3862+
"slot": "0"
3863+
},
3864+
{
3865+
"label": "description",
3866+
"type": "t_string_storage",
3867+
"offset": 0,
3868+
"slot": "1"
3869+
},
3870+
{
3871+
"label": "context",
3872+
"type": "t_string_storage",
3873+
"offset": 0,
3874+
"slot": "2"
3875+
},
3876+
{
3877+
"label": "schema",
3878+
"type": "t_string_storage",
3879+
"offset": 0,
3880+
"slot": "3"
3881+
}
3882+
],
3883+
"numberOfBytes": "128"
3884+
},
3885+
"t_uint256": {
3886+
"label": "uint256",
3887+
"numberOfBytes": "32"
3888+
},
3889+
"t_uint8": {
3890+
"label": "uint8",
3891+
"numberOfBytes": "1"
3892+
}
3893+
},
3894+
"namespaces": {}
3895+
}
37343896
}
37353897
}
37363898
}

0 commit comments

Comments
 (0)