diff --git a/README.md b/README.md index 2d94c842e1..a0a5235e02 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The platform is composed of multiple Rust crates. Top-level executable binary cr * nym-gateway - acts sort of like a mailbox for mixnet messages, removing the need for directly delivery to potentially offline or firewalled devices. * nym-network-monitor - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing"). * nym-explorer - a (projected) block explorer and (existing) mixnet viewer. -* nym-wallet (currently in development) - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework. +* nym-wallet - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework. [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0) [![Build Status](https://img.shields.io/github/workflow/status/nymtech/nym/Continuous%20integration/develop?style=for-the-badge&logo=github-actions)](https://github.com/nymtech/nym/actions?query=branch%3Adevelop) diff --git a/docker-compose.yml b/docker-compose.yml index dde2622bbb..44f0288627 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,9 @@ version: '3.7' x-bech32-prefix: &BECH32_PREFIX punk x-wasmd-version: &WASMD_VERSION - v0.17.0 + v0.21.0 +x-wasmd-commit-hash: &WASMD_COMMIT_HASH + 1d436638af7cacb5aeeb7248b57b085c64f3ae35 services: genesis_validator: @@ -11,6 +13,7 @@ services: args: BECH32_PREFIX: *BECH32_PREFIX WASMD_VERSION: *WASMD_VERSION + WASMD_COMMIT_HASH: *WASMD_COMMIT_HASH image: validator:latest ports: - "26657:26657" @@ -42,6 +45,11 @@ services: image: contract:latest volumes: - ".:/nym" + vesting_contract: + build: docker/vesting_contract + image: vesting_contract:latest + volumes: + - ".:/nym" contract_uploader: build: docker/typescript_client image: contract_uploader:typescript @@ -55,16 +63,6 @@ services: - "mixnet_contract" environment: BECH32_PREFIX: *BECH32_PREFIX - wallet: - build: docker/wallet-web - image: wallet:latest - ports: - - "3000:3000" - volumes: - - "contract_volume:/contract_volume" - - "./wallet-web:/wallet-web:ro" - depends_on: - - "contract_uploader" mnemonic_echo: build: docker/mnemonic_echo image: mnemonic_echo:latest @@ -79,7 +77,6 @@ services: - --storageEngine=wiredTiger volumes: - mongo_data:/data/db - block_explorer: build: context: https://github.com/forbole/big-dipper.git#v0.41.x-7 @@ -93,13 +90,10 @@ services: MONGO_URL: mongodb://mongo:27017/meteor PORT: 3000 METEOR_SETTINGS: ${METEOR_SETTINGS} - - network_explorer: + explorer: build: - context: docker/network_explorer - args: - PERSONAL_TOKEN: ${PERSONAL_TOKEN} - image: network_explorer:latest + context: docker/explorer + image: explorer:latest ports: - "3040:3000" depends_on: diff --git a/docker/explorer/Dockerfile b/docker/explorer/Dockerfile new file mode 100644 index 0000000000..d6a100419f --- /dev/null +++ b/docker/explorer/Dockerfile @@ -0,0 +1,4 @@ +FROM node:16 + +COPY ./setup.sh /setup.sh +CMD /setup.sh diff --git a/docker/explorer/setup.sh b/docker/explorer/setup.sh new file mode 100755 index 0000000000..38632b63b8 --- /dev/null +++ b/docker/explorer/setup.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +git clone https://github.com/nymtech/nym.git + +mkdir /explorer-copy +cp -r nym/explorer/* /explorer-copy + +cd /explorer-copy + +npm install +#baseUrl +sed -i 's/https:\/\/testnet-milhon-explorer.nymtech.net\//http:\/\/localhost:3080/' ./src/api/constants.ts + +#master validator +sed -i 's/https:\/\/testnet-milhon-validator1.nymtech.net/http:\/\/localhost:26657/' ./src/api/constants.ts + +#big dipper url +sed -i 's/https:\/\/testnet-milhon-blocks.nymtech.net\//http:\/\/localhost:3080/' ./src/api/constants.ts + +nohup npm run start \ No newline at end of file diff --git a/docker/network_explorer/Dockerfile b/docker/network_explorer/Dockerfile deleted file mode 100644 index 26f1f71e00..0000000000 --- a/docker/network_explorer/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM node:14 -ARG PERSONAL_TOKEN -RUN git clone "https://oauth2:${PERSONAL_TOKEN}@gitlab.nymte.ch/jessgess/network-explorer.git" - -WORKDIR network-explorer -COPY ./setup.sh /setup.sh -RUN /setup.sh -CMD yarn dev diff --git a/docker/network_explorer/setup.sh b/docker/network_explorer/setup.sh deleted file mode 100755 index d23c08b097..0000000000 --- a/docker/network_explorer/setup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -git checkout b1ba77461a50ab6b31b8384a8f8e348141b37a43 - -sed -i 's/https:\/\/testnet-finney-blocks.nymtech.net\//http:\/\/localhost:3080/' ./layouts/default.vue -sed -i 's/https:\/\/testnet-milhon-validator1.nymtech.net/http:\/\/localhost:26657/' networkVariables.json -sed -i 's/https:\/\/testnet-finney-blocks.nymtech.net\//http:\/\/localhost:3080/' pages/index.vue - -yarn install - diff --git a/docker/typescript_client/upload_contract/package.json b/docker/typescript_client/upload_contract/package.json index 6f20e40468..b52590cc53 100644 --- a/docker/typescript_client/upload_contract/package.json +++ b/docker/typescript_client/upload_contract/package.json @@ -17,7 +17,7 @@ "dependencies": { "@types/node": "^14.14.22", "nodemon": "^2.0.7", - "nym-validator-client": "file:/nym/clients/validator", + "@nymproject/nym-validator-client" : "0.18.0", "save-dev": "0.0.1-security", "tasktimer": "^3.0.0", "ts-node": "^9.1.1" diff --git a/docker/typescript_client/upload_contract/upload-wasm.ts b/docker/typescript_client/upload_contract/upload-wasm.ts index e5bb7c5b6f..c525de6f6b 100644 --- a/docker/typescript_client/upload_contract/upload-wasm.ts +++ b/docker/typescript_client/upload_contract/upload-wasm.ts @@ -1,6 +1,6 @@ // npx ts-node upload-wasm.ts -import ValidatorClient from "nym-validator-client"; +import ValidatorClient from "@nymproject/nym-validator-client"; import * as fs from 'fs'; async function newClient(): Promise { @@ -24,6 +24,9 @@ async function main() { // dave can upload (note: nobody else can) const uploadResult = await admin.upload(admin.address, wasm, undefined, "mixnet contract");//.then((uploadResult) => console.log("Upload from dave succeeded, codeId is: " + uploadResult.codeId)).catch((err) => console.log(err)); + //todo + //add vesting contract? + // Instantiate the copy of the option contract const { codeId } = uploadResult; console.log("code id is", codeId) diff --git a/docker/validator/setup.sh b/docker/validator/setup.sh index 8674bf99c8..07eb96e224 100755 --- a/docker/validator/setup.sh +++ b/docker/validator/setup.sh @@ -10,7 +10,7 @@ go build \ -X github.com/cosmos/cosmos-sdk/version.AppName=nymd \ -X github.com/CosmWasm/wasmd/app.NodeDir=.nymd \ -X github.com/cosmos/cosmos-sdk/version.Version=${WASMD_VERSION} \ - -X github.com/cosmos/cosmos-sdk/version.Commit=1920f80d181adbeaedac1eeea1c1c6e1704d3e49 \ + -X github.com/cosmos/cosmos-sdk/version.Commit=${WASMD_COMMIT_HASH} \ -X github.com/CosmWasm/wasmd/app.Bech32Prefix=${BECH32_PREFIX} \ -X 'github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger'" \ -trimpath ./cmd/wasmd diff --git a/docker/vesting_contract/Dockerfile b/docker/vesting_contract/Dockerfile new file mode 100644 index 0000000000..eddf9f7004 --- /dev/null +++ b/docker/vesting_contract/Dockerfile @@ -0,0 +1,3 @@ +FROM rust +RUN rustup target add wasm32-unknown-unknown +CMD cd nym/contracts/vesting && RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown \ No newline at end of file diff --git a/docker/wallet-web/Dockerfile b/docker/wallet-web/Dockerfile deleted file mode 100644 index aef59b698f..0000000000 --- a/docker/wallet-web/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM node -COPY entrypoint.sh /entrypoint.sh -CMD /entrypoint.sh diff --git a/docker/wallet-web/entrypoint.sh b/docker/wallet-web/entrypoint.sh deleted file mode 100755 index 964e15ed4b..0000000000 --- a/docker/wallet-web/entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -cd /wallet-web - -yarn install - -mkdir /wallet-copy -cp -r /wallet-web/* /wallet-copy -cd /wallet-copy - -# Wait for the contract to be uploaded -while ! [ -s /contract_volume/contract_address ]; do - sleep 1 -done - -CONTRACT_ADDRESS=$(cat /contract_volume/contract_address) -sed -i 's/export const BONDING_CONTRACT_ADDRESS: string = "punk10pyejy66429refv3g35g2t7am0was7yalwrzen";/export const BONDING_CONTRACT_ADDRESS: string = "'"${CONTRACT_ADDRESS}"'";/' pages/_app.tsx -sed -i 's/export const VALIDATOR_URLS: string\[\] = \[/export const VALIDATOR_URLS: string\[\] = \[ "localhost:26657",/' pages/_app.tsx -sed -i 's/"https:\/\/testnet-milhon-validator1.nymtech.net",//' pages/_app.tsx -sed -i 's/"https:\/\/testnet-milhon-validator2.nymtech.net",//' pages/_app.tsx - -yarn dev