Skip to content

Commit

Permalink
Production Deploy (#13854)
Browse files Browse the repository at this point in the history
* Manual deploy as of commit:018ce230293bcaf1416ee586a93e1a73942fae34

* feat(unlock-app): more warnings about Ethereum mainnet

* fix(unlock-app): removed extra messages
  • Loading branch information
julien51 committed May 16, 2024
1 parent 717cdba commit d895bef
Show file tree
Hide file tree
Showing 265 changed files with 20,340 additions and 8,571 deletions.
5 changes: 3 additions & 2 deletions .clabot
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"Calla-Ji",
"blahkheart",
"TylerSehr",
"ClockRide"
"ClockRide",
"Tguntenaar"
],
"message": "Thank you for your pull request and welcome to Unlock! We require contributors to sign our [Contributor License Agreement](https://github.com/unlock-protocol/unlock/blob/master/CLA.txt), and we don't seem to have the users {{usersWithoutCLA}} on file. \nIn order for us to review and merge your code, please open _another_ pull request with a single modification: your github username added to the file `.clabot`.\nThank you! "
}
}
5 changes: 5 additions & 0 deletions .github/workflows/_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
BUILDKIT_PROGRESS: plain
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Prepare repo
run: yarn && yarn build
- name: Run Integration Tests
run: scripts/integration-tests.sh
- name: Archive production artifacts
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ yarn-error.log
.netlify
.vercel
governance/.openzeppelin/unknown-31337.json

# log files
nohup.out
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ checksumBehavior: update

compressionLevel: mixed

defaultSemverRangePrefix: ""

enableGlobalCache: false

nodeLinker: node-modules
Expand All @@ -16,9 +18,6 @@ npmPublishRegistry: "https://registry.npmjs.org/"

npmRegistryServer: "https://registry.npmjs.org/"

# prevent caret from being added when using `yarn up`
defaultSemverRangePrefix: ""

packageExtensions:
eslint-config-next@*:
dependencies:
Expand All @@ -28,4 +27,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-engines.cjs
spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js"

yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
4 changes: 3 additions & 1 deletion docker/development/eth-node/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
**/node_modules
cache
.yarn
.yarn/cache
.yarn/install-state.gz
18 changes: 16 additions & 2 deletions docker/development/eth-node/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# local deps
packages
networks.json

# contracts
cache
.yarn
networks.json

# yarn
.yarn/*
.yarn/install-state.gz
.pnp.js
# !.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
File renamed without changes.
2 changes: 2 additions & 0 deletions docker/development/eth-node/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarnPath: .yarn/releases/yarn-4.1.1.cjs
nodeLinker: node-modules
7 changes: 5 additions & 2 deletions docker/development/eth-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ WORKDIR /app
# install deps
COPY --chown=node package.json package.json
COPY --chown=node yarn.lock yarn.lock
RUN yarn install --pure-lockfile
COPY --chown=node .yarn .yarn
COPY --chown=node .yarnrc.yml .yarnrc.yml

# add files
COPY --chown=node . .

RUN yarn

EXPOSE 8545
CMD [ "yarn", "hardhat", "node", "--hostname", "0.0.0.0" ]
CMD [ "yarn", "hardhat", "node", "--hostname", "0.0.0.0" ]
13 changes: 11 additions & 2 deletions docker/development/eth-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,26 @@
"description": "Simple ETH node for development purposes",
"private": true,
"scripts": {
"packages:clean": "yarn packages --parallel run clean",
"packages:build": "yarn packages --topological-dev run build",
"build": "yarn packages:clean && yarn packages:build",
"lint:fix": "yarn lint --fix",
"lint": "eslint --resolve-plugins-relative-to ../eslint-config --ext .tsx,.ts,.js scripts/",
"packages": "yarn workspaces foreach --recursive --from '{@unlock-protocol/types,@unlock-protocol/core,@unlock-protocol/eslint-config,@unlock-protocol/hardhat-helpers,@unlock-protocol/express,@unlock-protocol/contracts,@unlock-protocol/networks,@unlock-protocol/paywall,@unlock-protocol/unlock-js,@unlock-protocol/crypto-icon,@unlock-protocol/ui,@unlock-protocol/hardhat-plugin,@unlock-protocol/email-templates}'",
"provision": "hardhat run scripts/provision.ts",
"start": "hardhat node"
},
"workspaces": [
"packages/**"
],
"dependencies": {
"@nomicfoundation/hardhat-ethers": "3.0.5",
"@unlock-protocol/contracts": "latest",
"@unlock-protocol/hardhat-plugin": "latest",
"@unlock-protocol/contracts": "workspace:^",
"@unlock-protocol/hardhat-plugin": "workspace:^",
"@unlock-protocol/networks": "workspace:^",
"eslint": "8.57.0",
"ethers": "6.10.0",
"fs-extra": "11.2.0",
"hardhat": "2.22.3",
"hardhat-erc1820": "0.1.0",
"ts-node": "10.9.2",
Expand Down
11 changes: 8 additions & 3 deletions docker/development/eth-node/scripts/provision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ async function main() {
* 3. Deploy UNLOCK contracts
*/
const { unlock: unlockContract } = await unlock.deployProtocol()
log('UNLOCK PROTOCOL DEPLOYED')
const [publicLockVersion, unlockVersion] = await Promise.all([
await unlockContract.publicLockLatestVersion(),
await unlockContract.unlockVersion(),
])
log(
`UNLOCK PROTOCOL DEPLOYED : Unlock v${unlockVersion}, PublicLock v${publicLockVersion}`
)

// grant Unlock minting permissions
await udt.addMinter(await unlockContract.getAddress())
Expand All @@ -100,8 +106,7 @@ async function main() {
// Finally, deploy locks and for each of them, if it's an ERC20, approve it for locksmith purchases
await Promise.all(
locksArgs(erc20Address).map(async (lockParams) => {
const { lock } = await unlock.createLock(lockParams)

const { lock } = await unlock.createLock({ ...lockParams })
log(
`LOCK "${await lockParams.name}" DEPLOYED TO ${await lock.getAddress()}`
)
Expand Down
Loading

0 comments on commit d895bef

Please sign in to comment.