Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paritad99 committed Dec 7, 2023
1 parent 15b3318 commit 0e85edc
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 3 deletions.
90 changes: 90 additions & 0 deletions Dockerfile-ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
FROM --platform=linux ubuntu:22.04
ARG BUILDARCH

# Change your versions here
ENV GO_VERSION=1.20.3
ENV IGNITE_VERSION=0.22.1
ENV NODE_VERSION=20.8.1

ENV LOCAL=/usr/local
ENV GOROOT=$LOCAL/go
ENV HOME=/root
ENV GOPATH=$HOME/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH

RUN mkdir -p $GOPATH/bin

ENV PACKAGES curl gcc jq
RUN apt-get update
RUN apt-get install -y $PACKAGES

# Install Go
RUN curl -L https://go.dev/dl/go${GO_VERSION}.linux-$BUILDARCH.tar.gz | tar -C $LOCAL -xzf -

# Install Ignite
RUN curl -L https://get.ignite.com/cli@v${IGNITE_VERSION}! | bash

# Install Node
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
RUN apt-get install -y nodejs

# Install git
RUN apt-get install -y git

RUN apt-get install wget

# Install make
# RUN apt-get install make


# RUN cd $HOME
# RUN git clone https://github.com/cosmos/gaia
# RUN cd gaia && git checkout v13.0.0-rc0 && make install
# ADD gaia $HOME/go/bin

# To sync from genesis, comment out the next line.
# RUN
# To sync from genesis, uncomment the next line and skip the State Sync Setup section.
# git checkout v6.0.4
# RUN
# RUN export PATH=$PATH:$HOME/go/bin
# RUN gaiad init cifer_ai

# RUN cd $HOME
# RUN wget https://github.com/cosmos/testnets/raw/master/public/genesis.json.gz
# RUN gzip -d genesis.json.gz
# RUN mv genesis.json $HOME/.gaia/config/genesis.json

# Set minimum gas price & peers
# RUN cd ./gaia/config
# RUN sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uatom"/' app.toml
# RUN sed -i 's/seeds = ""/seeds = "639d50339d7045436c756a042906b9a69970913f@seed-01.theta-testnet.polypore.xyz:26656,3e506472683ceb7ed75c1578d092c79785c27857@seed-02.theta-testnet.polypore.xyz:26656"/' config.toml


# RUN cd $HOME/.gaia/config
# RUN sed -i 's/enable = false/enable = true/' config.toml
# RUN sed -i 's/trust_height = 0/trust_height = 12,562,000/' config.toml
# RUN sed -i 's/trust_hash = ""/trust_hash = "6F958861E1FA409639C8F2DA899D09B9F50A66DBBD49CE021A2FF680FA8A9204"/' config.toml
# RUN sed -i 's/rpc_servers = ""/rpc_servers = "http:\/\/state-sync-01.theta-testnet.polypore.xyz:26657,http:\/\/state-sync-02.theta-testnet.polypore.xyz:26657"/' config.toml


EXPOSE 26657 26656 26658 1317 4500 5000 3000

WORKDIR /cifer


# Create the image
# $ docker build -f Dockerfile-ubuntu . -t cifer_i
# To test only 1 command
# $ docker run --rm -it -v $(pwd):/cifer -w /cifer cifer_i go test github.com/cifer-ai/cifer/x/cifer/keeper
# To build container
# $ docker create --name cifer -i -v $(pwd):/cifer -w /cifer -p 26656:26656 -p 26658:26658 -p 8081:26657 -p 8082:1317 -p 8083:4500 -p 8084:5000 -p 8085:3000 cifer_i
# $ docker start cifer
# To run server on it
# $ docker exec -it cifer ignite chain serve --reset-once
# In other shell, to query it
# $ docker exec -it cifer ciferd query cifer list-stored-game

# docker exec -it cifer cd vue npm run dev
# docker create --name checkers -i -v $(pwd):/checkers -w /checkers -p 8081:1317 -p 8082:26657 -p 8083:1317 -p 8084:4500 checkers_i
# docker run --rm -it -v $(pwd):/checkers -w /checkers -p 1317:1317 -p 26657:26657 -p 1317:1317 -p 4500:4500 --name checkers checkers_i ignite chain serve
33 changes: 33 additions & 0 deletions assetlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"assets": [
{
"description": "CIFER.AI Decentralized Collective Learning for Regulatory and Ethical AI",
"denom_units": [
{
"denom": "ibc/ETH123",
"exponent": 0,
"aliases": ["cifer"]
},
{
"denom": "cifer",
"exponent": 6
},
{
"denom": "cifer",
"exponent": 18,
"aliases": ["cifer"]
}
],
"base": "ibc/ETH123",
"name": "cifer",
"display": "cifer",
"symbol": "cif",
"logo_URIs": {
"png": "https://cifer.ai/cif.png",
"svg": "https://cifer.ai/cif.svg"
},
"coingecko_id": "cifer"
}
]
}

41 changes: 41 additions & 0 deletions chain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"chain_name": "cifer",
"status": "testnet",
"network_type": "testnet",
"pretty_name": "cifer",
"chain_id": "cifer-1",
"bech32_prefix": "cifer",
"daemon_name": "cifer",
"node_home": "$HOME/.cifer",
"genesis": {
"genesis_url": "https://raw.githubusercontent.com/cifer/genesis/master/genesis.json"
},
"key_algos": ["secp256k1"],
"slip44": 118,
"fees": {
"fee_tokens": [
{
"denom": "cifer",
"fixed_min_gas_price": "0.025cif"
}
]
},
"codebase": {
"git_repo": "https://github.com/cifer-ai/cifer",
"recommended_version": "v1.0.0",
"compatible_versions": ["v1.0.0"],
"binaries": {
"linux/amd64": "https://github.com/cifer/cifer/releases/download/v1.0.0/cifer-linux-amd64-v1.0.0",
"darwin/amd64": "https://github.com/cifer/cifer/releases/download/v1.0.0/cifer-darwin-amd64-v1.0.0"
}
},
"explorers": [
{
"kind": "mintscan",
"url": "https://www.mintscan.io/cifer",
"tx_page": "https://www.mintscan.io/cifer/txs/{txHash}",
"account_page": "https://www.mintscan.io/cifer/account/{address}"
}
]
}

6 changes: 3 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
accounts:
- name: alice
coins: ["20000token", "200000000stake"]
coins: ["1000000000cif", "200000000stake"]
- name: bob
coins: ["10000token", "100000000stake"]
coins: ["1000000000cif", "100000000stake"]
validator:
name: alice
staked: "100000000stake"
Expand All @@ -13,4 +13,4 @@ client:
path: "vue/src/store"
faucet:
name: bob
coins: ["5token", "100000stake"]
coins: ["5cif", "100000stake"]
16 changes: 16 additions & 0 deletions peers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"peers": [
{
"id": "ba3bacc714b2aa32058d9db53f4d77f5f23ed7b4",
"address": "119.59.105.97:26656",
"provider": "Stakeholder One"
}
],
"apis": [
{
"address": "https://rpc.cifer.com",
"provider": "Stakeholder Two"
}
]
}

6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Ignite CLI has scaffolded a Vue.js-based web app in the `vue` directory. Run the
cd vue
npm install
npm run serve
🙂 Created account "alice" with address "cosmos129qv0ve5zkfgq6ms555mlr8x9zypq0rw9n0fnh" with mnemonic: "exist style control frame web end heavy social problem rain slush open life click lunar habit audit farm twelve shiver crack lend skin half"
🙂 Created account "bob" with address "cosmos10cysp4f8kgdkrn4udw8yna062d3kkklqlmlksf" with mnemonic: "update grape off fix belt pioneer bulk depth fat shell vast off april already video sweet fence harbor please cushion small alter someone problem"
```

The frontend app is built using the `@starport/vue` and `@starport/vuex` packages. For details, see the [monorepo for Ignite front-end development](https://github.com/ignite-hq/web).
Expand Down

0 comments on commit 0e85edc

Please sign in to comment.