Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'origin-dev' into 1001-tracing
- Loading branch information
Showing
68 changed files
with
303 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.1 | ||
0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/Dockerfile
This file was deleted.
Oops, something went wrong.
21 changes: 10 additions & 11 deletions
21
...a-modules/eth-ens-ipfs/docker-compose.yml → ...-modules/eth-ens-ipfs/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
version: '3' | ||
services: | ||
ens-scripts: | ||
build: ./ | ||
links: | ||
- ganache | ||
environment: | ||
ETHEREUM_PORT: '${ETHEREUM_PORT:-8545}' | ||
ganache: 'ganache:8545' | ||
depends_on: | ||
- "ganache" | ||
command: ["./wait-for-it.sh", "ganache:8545", "--", "yarn", "deployEns"] | ||
ganache: | ||
image: 'trufflesuite/ganache-cli:v6.12.2' | ||
ports: | ||
- '${ETHEREUM_PORT:-8545}:8545' | ||
command: -l 8000000 --networkId 1576478390085 --deterministic --hostname=0.0.0.0 | ||
ipfs: | ||
image: 'ipfs/go-ipfs:v0.4.23' | ||
build: ./ipfs | ||
ports: | ||
- '${IPFS_PORT:-5001}:5001' | ||
- '8080:8080' | ||
- '4001:4001' | ||
ens: | ||
build: ./ens | ||
links: | ||
- ganache | ||
environment: | ||
ETH_PROVIDER: 'ganache:8545' | ||
depends_on: | ||
- "ganache" | ||
command: ["./wait-for-it.sh", "ganache:8545", "--", "yarn", "deployEns"] |
15 changes: 0 additions & 15 deletions
15
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ens-scripts/src/index.ts
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ens/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:10.15.3-alpine | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apk --no-cache --virtual build-dependencies add \ | ||
bash | ||
|
||
# Install deps | ||
COPY ./scripts/package.json ./ | ||
RUN yarn | ||
|
||
# Copy the rest of our source files | ||
COPY ./scripts ./ | ||
|
||
# Build | ||
RUN yarn build | ||
|
||
# Deploy | ||
CMD yarn deployEns |
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ens/scripts/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { deployENS } from "./utils/deployENS"; | ||
|
||
import { ethers } from "ethers"; | ||
|
||
async function run() { | ||
if (!!process.env.ETH_PROVIDER === false) { | ||
throw Error("ETH_PROVIDER undefined"); | ||
} | ||
|
||
const provider = new ethers.providers.JsonRpcProvider( | ||
`http://${process.env.ETH_PROVIDER}` | ||
); | ||
|
||
console.log("Waiting for RPC node..."); | ||
await provider.ready; | ||
|
||
console.log("Deploying ENS...") | ||
const addresses = await deployENS(provider); | ||
console.log(addresses); | ||
} | ||
|
||
run() | ||
.then(() => { | ||
process.exit(); | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
process.abort(); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ipfs/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM ipfs/go-ipfs:v0.4.23 | ||
|
||
COPY ./start_ipfs /usr/local/bin | ||
COPY ./config_ipfs /usr/local/bin |
4 changes: 4 additions & 0 deletions
4
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ipfs/config_ipfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]' | ||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["GET", "POST", "PUT", "DELETE"]' |
58 changes: 58 additions & 0 deletions
58
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/ipfs/start_ipfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
set -e | ||
user=ipfs | ||
repo="$IPFS_PATH" | ||
|
||
if [ `id -u` -eq 0 ]; then | ||
echo "Changing user to $user" | ||
# ensure folder is writable | ||
su-exec "$user" test -w "$repo" || chown -R -- "$user" "$repo" | ||
# restart script with new privileges | ||
exec su-exec "$user" "$0" "$@" | ||
fi | ||
|
||
# 2nd invocation with regular user | ||
ipfs version | ||
|
||
if [ -e "$repo/config" ]; then | ||
echo "Found IPFS fs-repo at $repo" | ||
else | ||
case "$IPFS_PROFILE" in | ||
"") INIT_ARGS="" ;; | ||
*) INIT_ARGS="--profile=$IPFS_PROFILE" ;; | ||
esac | ||
ipfs init $INIT_ARGS | ||
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001 | ||
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 | ||
|
||
# Set up the swarm key, if provided | ||
|
||
SWARM_KEY_FILE="$repo/swarm.key" | ||
SWARM_KEY_PERM=0400 | ||
|
||
# Create a swarm key from a given environment variable | ||
if [ ! -z "$IPFS_SWARM_KEY" ] ; then | ||
echo "Copying swarm key from variable..." | ||
echo -e "$IPFS_SWARM_KEY" >"$SWARM_KEY_FILE" || exit 1 | ||
chmod $SWARM_KEY_PERM "$SWARM_KEY_FILE" | ||
fi | ||
|
||
# Unset the swarm key variable | ||
unset IPFS_SWARM_KEY | ||
|
||
# Check during initialization if a swarm key was provided and | ||
# copy it to the ipfs directory with the right permissions | ||
# WARNING: This will replace the swarm key if it exists | ||
if [ ! -z "$IPFS_SWARM_KEY_FILE" ] ; then | ||
echo "Copying swarm key from file..." | ||
install -m $SWARM_KEY_PERM "$IPFS_SWARM_KEY_FILE" "$SWARM_KEY_FILE" || exit 1 | ||
fi | ||
|
||
# Unset the swarm key file variable | ||
unset IPFS_SWARM_KEY_FILE | ||
|
||
fi | ||
|
||
$(dirname $0)/config_ipfs | ||
|
||
exec ipfs "$@" |
4 changes: 0 additions & 4 deletions
4
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/postgres/Dockerfile
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module.exports = { | ||
...require("./jest.config"), | ||
testMatch: ["**/wasm-rs.ts"] | ||
testMatch: ["**/wasm-rs.spec.ts"], | ||
modulePathIgnorePatterns: [], | ||
}; |
Oops, something went wrong.