Skip to content

Commit

Permalink
Feat/upgrade cosmos sdk 0.47.4 (#379)
Browse files Browse the repository at this point in the history
* feat: create code to decode event-attribute for each version cosmos sdk

* fix: use old version aurajs

* fix: add registry to job reassign (not used)

* fix: refactor code decodeAttribute and encodeAttribute in aura registry

* fix: fix test when decode attribute

* fix: update aurajs to support cosmos sdk 0.47.4

* feat: upgrade cosmjs and aurajs; fix test crawl proposal with Long attribute

* feat: update image aurad to test; update unit test with new aurad

* feat: update dockerfile aurad in test.yml when run ci test

* feat: add constant for v1 gov proposal and consensus module

* feat: decode messages in tx submit proposal; add job redecode gov.v1.MsgSubmitProposal

* feat: add constant for v1 gov proposal and consensus module

* feat: decode messages in tx submit proposal; add job redecode gov.v1.MsgSubmitProposal

* feat: create job redecode tx by api

* feat: use gov.v1 instead gov.v1beta1 when crawl proposal info

* fix: fix type old proposal v1beta1

* feat: add handle vote for gov.v1.MsgVote

* feat: update tally in ended proposal

* feat: update version aurajs to decode feegrant

* fix: fix lint in crawl proposal

* fix: add through error when crawl proposal fail

* feat: use aurajs from npm; update CI to remove NPM_TOKEN

* fix: allow null voting_start_time, voting_end_time in gov.v1 proposal

* fix: change npm to yarn in dockerfile
  • Loading branch information
fibonacci998 authored Nov 16, 2023
1 parent 7c6da47 commit e1d4158
Show file tree
Hide file tree
Showing 30 changed files with 4,377 additions and 3,976 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.KEY_NPM_RC }}
run: |
./ci/build.sh
updateManifest:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.KEY_NPM_RC }}
run: |
./ci/build.sh
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ jobs:

- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.KEY_NPM_RC }}
- name: Lint check
run: npm run lint
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- 6379:6379

aurad:
image: auranw/local-aurad:latest
image: auranw/local-aurad:dev_v0.7.0-3
ports:
- 1317:1317
- 26657:26657
Expand Down Expand Up @@ -61,8 +61,6 @@ jobs:
run: npm list
- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.KEY_NPM_RC }}
- name: Setup env
run: cp ci/.env.ci .env
- name: Setup config.json
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ FROM node:16-alpine
WORKDIR /app

# Install dependencies
ARG NPM_TOKEN
RUN echo "@aura-nw:registry=https://npm.pkg.github.com" >> .npmrc && echo "//npm.pkg.github.com/:_authToken=$NPM_TOKEN" >> .npmrc
COPY package.json package.json ./
RUN npm install && rm .npmrc
COPY package.json package-lock.json yarn.lock ./
RUN yarn install

# Copy source
COPY . .

# Build and cleanup
ENV NODE_ENV=production
RUN npm run build
RUN yarn build

# Start server
CMD ["npm", "run", "start"]
CMD ["yarn", "start"]
2 changes: 1 addition & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -xe
#Login to registry
echo $GITHUB_PASSWORD | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
#Build and push image
docker build -t ${CONTAINER_RELEASE_IMAGE} --build-arg NPM_TOKEN=$NPM_TOKEN -f Dockerfile .
docker build -t ${CONTAINER_RELEASE_IMAGE} -f Dockerfile .
docker push ${CONTAINER_RELEASE_IMAGE}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.3'
services:
aurad:
container_name: aurad_erascope
image: auranw/local-aurad:latest
image: auranw/local-aurad:dev_v0.7.0-3
ports:
- '1317:1317'
- '26656:26656'
Expand Down
15 changes: 15 additions & 0 deletions migrations/20231115070514_drop_not_null_in_voting_time_proposal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable('proposal', (table) => {
table.timestamp('voting_start_time').nullable().alter();
table.timestamp('voting_end_time').nullable().alter();
});
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('proposal', (table) => {
table.timestamp('voting_start_time').notNullable().alter();
table.timestamp('voting_end_time').notNullable().alter();
});
}
Loading

0 comments on commit e1d4158

Please sign in to comment.