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

Add upgrade paths subgraph entity #74

Draft
wants to merge 15 commits into
base: add-contract-version-to-upgrade-event
Choose a base branch
from
Draft
342 changes: 342 additions & 0 deletions abis/UpgradeGate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
[
{
"type": "constructor",
"inputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "acceptOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "cancelOwnershipTransfer",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "contractName",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "contractURI",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_initialOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isAllowedUpgrade",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "isRegisteredUpgradePath",
"inputs": [
{
"name": "baseImpl",
"type": "address",
"internalType": "address"
},
{
"name": "upgradeImpl",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pendingOwner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "registerUpgradePath",
"inputs": [
{
"name": "baseImpls",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "upgradeImpl",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "removeUpgradePath",
"inputs": [
{
"name": "baseImpl",
"type": "address",
"internalType": "address"
},
{
"name": "upgradeImpl",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "resignOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "safeTransferOwnership",
"inputs": [
{
"name": "_newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "_newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnerCanceled",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "canceledOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnerPending",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "pendingOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnerUpdated",
"inputs": [
{
"name": "prevOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpgradeGateSetup",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "UpgradeRegistered",
"inputs": [
{
"name": "baseImpl",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "upgradeImpl",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpgradeRemoved",
"inputs": [
{
"name": "baseImpl",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "upgradeImpl",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED",
"inputs": []
},
{
"type": "error",
"name": "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING",
"inputs": []
},
{
"type": "error",
"name": "ONLY_OWNER",
"inputs": []
},
{
"type": "error",
"name": "ONLY_PENDING_OWNER",
"inputs": []
},
{
"type": "error",
"name": "OWNER_CANNOT_BE_ZERO_ADDRESS",
"inputs": []
}
]
7 changes: 7 additions & 0 deletions config/zora-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,12 @@
"startBlock": "1278602",
"version": "1"
}
],
"upgradeGate1155": [
{
"address": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
"startBlock": "1278601",
"version": "1"
}
]
}
13 changes: 13 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ type Upgrade @entity {
type: String
}

type ContractVersion @entity {
# id is implementation address
id: Bytes!
version: String!
}

type UpgradePath @entity {
id: ID!

from: ContractVersion!
to: ContractVersion!
}

type EditionMetadata @entity {
id: ID!

Expand Down
Loading