Skip to content

Commit

Permalink
Merge pull request #337 from desci-labs/m0ar/dpid-alias-contract
Browse files Browse the repository at this point in the history
dPID alias registry contract
  • Loading branch information
m0ar authored Jun 18, 2024
2 parents 368164c + 4f1829b commit 144615c
Show file tree
Hide file tree
Showing 104 changed files with 12,155 additions and 7,160 deletions.
7 changes: 4 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
**/node_modules
**/dist
**/.vscode
desci-server/log
config
dist
./node_modules
.git
.env
desci-art-viewer
desci-dapp
desci-server/node_modules
local-data
database
desci-server/log
7 changes: 4 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ AWS_SECRET_ACCESS_KEY=

# for faucet
HOT_WALLET_KEY=

# for upgrading legacy dPID's (default is ganache account #1 for local dev)
REGISTRY_OWNER_PKEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

# https://cso-classifier.internal
CSO_CLASSIFIER_API=
# vscode runnable
Expand Down Expand Up @@ -111,9 +115,6 @@ GOOGLE_DEV_API_KEY= # Unnecessary for now, not doing serverside 2step
## Configure RPC nodes (open an issue/ping us to access DeSci Labs' nodes)
ETHEREUM_RPC_URL=http://host.docker.internal:8545

# Use this for Goerli testnet
# ETHEREUM_RPC_URL=https://eth-goerli.g.alchemy.com/v2/demo

# Use this for Sepolia testnet
# ETHEREUM_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/demo

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
docker info
- name: Install dependencies
run: cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn && cd ../desci-repo && yarn
run: cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn --ignore-engines && cd ../desci-repo && yarn

- name: Stub contract
run: |
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Run tests
run: |
cd desci-server && export DOCKER_BUILDKIT=1 && yarn && yarn test
cd desci-server && export DOCKER_BUILDKIT=1 && yarn --ignore-engines && yarn test
if [ $? -ne 0 ]; then
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/build-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
docker info
- name: Install dependencies
run: cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn
run: cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn --ignore-engines

- name: Stub contract
run: |
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Run tests
run: |
cd desci-server && export DOCKER_BUILDKIT=1 && yarn && yarn test
cd desci-server && export DOCKER_BUILDKIT=1 && yarn --ignore-engines && yarn test
echo "exit code $?"
if [ $? -ne 0 ]; then
exit 1
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ COPY --chown=node:node ./desci-contracts/artifacts ./src/desci-contracts-artifac
RUN mv package.json package.json.old
RUN sed 's/link:/file:/' package.json.old > package.json

RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install
# Remove ignore-engines flag after bump to node 20, composedb CLI blocks installing meanwhile
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --ignore-engines

RUN chown -R node /app/node_modules/.prisma
RUN chown -R node /root/.cache/prisma/master
Expand Down
1 change: 1 addition & 0 deletions desci-contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ build
*.dbg.json
flat.sol
dist
.vscode
201 changes: 201 additions & 0 deletions desci-contracts/.openzeppelin/opSepoliaDev-dpid-alias-registry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0x280685c10281F16b4A8585810f695E293B6097eB",
"txHash": "0x5d600bd4cc7f920597350266a6d3840c9d938b6bf5f0d0ccde77117fd2c95ea0"
},
"proxies": [
{
"address": "0x2Ea4Ee2Af79495e045EBe925aC67d755520877e7",
"txHash": "0x32b16b14970350db7db8bdc9da8c7ddffa389f5678e810f3d3208cb277b76a1c",
"kind": "transparent"
}
],
"impls": {
"a230b5b705959d3e3e4fc01d0b0da971f2e249681ed6a78165280ba33db100b5": {
"address": "0x682c122e535aB4637AA6d8DCCCa106CA89831918",
"txHash": "0x6e925112f68a35e6e8a9ba70f88cab98bc88e3de0e64f5f4d398efb8aaab1721",
"layout": {
"solcVersion": "0.8.4",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "51",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_paused",
"offset": 0,
"slot": "101",
"type": "t_bool",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"label": "nextDpid",
"offset": 0,
"slot": "151",
"type": "t_uint256",
"contract": "DpidAliasRegistry",
"src": "contracts/DpidAliasRegistry.sol:10"
},
{
"label": "registry",
"offset": 0,
"slot": "152",
"type": "t_mapping(t_uint256,t_string_storage)",
"contract": "DpidAliasRegistry",
"src": "contracts/DpidAliasRegistry.sol:13"
},
{
"label": "reverseRegistry",
"offset": 0,
"slot": "153",
"type": "t_mapping(t_string_memory_ptr,t_uint256)",
"contract": "DpidAliasRegistry",
"src": "contracts/DpidAliasRegistry.sol:16"
},
{
"label": "legacy",
"offset": 0,
"slot": "154",
"type": "t_mapping(t_uint256,t_struct(LegacyDpidEntry)843_storage)",
"contract": "DpidAliasRegistry",
"src": "contracts/DpidAliasRegistry.sol:125"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(LegacyVersion)836_storage)dyn_storage": {
"label": "struct DpidAliasRegistry.LegacyVersion[]",
"numberOfBytes": "32"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_mapping(t_string_memory_ptr,t_uint256)": {
"label": "mapping(string => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_string_storage)": {
"label": "mapping(uint256 => string)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_struct(LegacyDpidEntry)843_storage)": {
"label": "mapping(uint256 => struct DpidAliasRegistry.LegacyDpidEntry)",
"numberOfBytes": "32"
},
"t_string_memory_ptr": {
"label": "string",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(LegacyDpidEntry)843_storage": {
"label": "struct DpidAliasRegistry.LegacyDpidEntry",
"members": [
{
"label": "owner",
"type": "t_address",
"offset": 0,
"slot": "0"
},
{
"label": "versions",
"type": "t_array(t_struct(LegacyVersion)836_storage)dyn_storage",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(LegacyVersion)836_storage": {
"label": "struct DpidAliasRegistry.LegacyVersion",
"members": [
{
"label": "cid",
"type": "t_string_storage",
"offset": 0,
"slot": "0"
},
{
"label": "time",
"type": "t_uint256",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "PausableUpgradeable",
"sourceName": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit 144615c

Please sign in to comment.