Skip to content

Commit

Permalink
Merge pull request #870 from oceanprotocol/feature/template_sapphire
Browse files Browse the repository at this point in the history
Feature/template_sapphire
  • Loading branch information
alexcos20 authored Aug 13, 2024
2 parents ba56e45 + 2ed0099 commit c49d299
Show file tree
Hide file tree
Showing 14 changed files with 12,883 additions and 22,327 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
env:
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
env:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
env:
Expand Down Expand Up @@ -159,10 +159,10 @@ jobs:
done
ls -la "$HOME/.ocean/ocean-contracts/artifacts/"
- run: cat ${HOME}/.ocean/ocean-contracts/artifacts/address.json
- run: node scripts/check_deployment.js
- name: docker logs
run: docker logs ocean_ocean-contracts_1
if: ${{ failure() }}
run: docker logs ocean-ocean-contracts-1
- run: node scripts/check_deployment.js


publish-npm:
needs: [lint, tests_full,check_deployment]
Expand All @@ -172,7 +172,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- name: Compile contracts
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
- name: Cache node_modules
uses: actions/cache@v2
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deployment_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
done
ls -la "$HOME/.ocean/ocean-contracts/artifacts/"
- run: cat ${HOME}/.ocean/ocean-contracts/artifacts/address.json
- run: node scripts/check_deployment.js
- name: docker logs
run: docker logs ocean_ocean-contracts_1
run: docker logs ocean-ocean-contracts-1
- run: node scripts/check_deployment.js

10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

FROM ubuntu:20.04 as base
FROM ubuntu:22.04 as base
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install curl bash
# nvm env vars
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR /usr/local/nvm
# IMPORTANT: set the exact version
ENV NODE_VERSION v16.20.2
ENV NODE_VERSION v20.16.0
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"
# add node and npm to the PATH
Expand All @@ -16,11 +16,11 @@ ENV PATH $NODE_PATH:$PATH


FROM base as builder
RUN apt-get update && apt-get -y install wget
RUN apt-get update && apt-get -y install wget build-essential
COPY . /ocean-contracts
WORKDIR /ocean-contracts
RUN npm i
RUN wget https://gobinaries.com/tj/node-prune --output-document - | /bin/sh && node-prune
#RUN wget https://gobinaries.com/tj/node-prune --output-document - | /bin/sh && node-prune



Expand All @@ -31,7 +31,7 @@ RUN mkdir -p /ocean-contracts/test/
COPY ./addresses /ocean-contracts/addresses/
COPY ./contracts /ocean-contracts/contracts/
COPY ./hardhat.config* /ocean-contracts/
COPY ./package* /ocean-contracts/
COPY ./package.json /ocean-contracts/
COPY ./scripts /ocean-contracts/scripts/
COPY ./test /ocean-contracts/test/
WORKDIR /ocean-contracts
Expand Down
6 changes: 4 additions & 2 deletions addresses/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@
"ERC20Template": {
"1": "0x519d462294958A935D34351b3ad9F98cCAB0b7f8",
"2": "0x2bCa501a6f9FB8a96f1b7B09D4f74A32ACAa7584",
"3": "0xf00c16665b79F23c04e5c8652Fe9853046b987c8"
"3": "0xf00c16665b79F23c04e5c8652Fe9853046b987c8",
"4": "0x89b752C3e272feBA17B363EaaBFe0d653cF75bE7"
},
"ERC721Template": {
"1": "0x9Ab15cc945b2B58A51384539211dE8a88a1355E8"
Expand Down Expand Up @@ -305,7 +306,8 @@
"ERC20Template": {
"1": "0xDBDa486d8fE29F75e9Ca858F438b380Fc14b1232",
"2": "0xF6410bf5d773C7a41ebFf972f38e7463FA242477",
"3": "0x1B083D8584dd3e6Ff37d04a6e7e82b5F622f3985"
"3": "0x1B083D8584dd3e6Ff37d04a6e7e82b5F622f3985",
"4": "0x4dD281EB67DED07E76E413Df16176D66ae69e240"
},
"ERC721Template": {
"1": "0x69B6E54Ad2b3c2801d11d8Ad56ea1d892555b776"
Expand Down
2 changes: 1 addition & 1 deletion contracts/accesslists/AccessList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract AccessList is Ownable, ERC721Enumerable,ERC721URIStorage {
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
override( ERC721Enumerable,ERC721URIStorage)
returns (bool)
{
return super.supportsInterface(interfaceId);
Expand Down
Loading

0 comments on commit c49d299

Please sign in to comment.