Skip to content

Commit

Permalink
Change bindings package name (#109)
Browse files Browse the repository at this point in the history
* Change bindings package name

* CircleCI nit

* Update genfiles and bindings by build bot

Truffle v5.1.56 (core: 5.1.56)
Solidity - 0.5.17 (solc-js)
Node v14.15.1
Web3.js v1.2.9

Co-authored-by: Build Bot <build@celer.network>
  • Loading branch information
Dominator008 and Build Bot committed Dec 7, 2020
1 parent 84e58c0 commit ac3f3c0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- run:
name: update genfiles and sync go bindings if PR
command: |
if [ -n "${CIRCLE_PULL_REQUEST##*/}" ]; then
if [[ ! -z $CIRCLE_PULL_REQUEST ]]; then
bash ./gen_and_push.sh "${CIRCLE_PULL_REQUEST##*/}" "$CIRCLE_BRANCH"
fi
- save_cache:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions gen_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ commit_and_push() {

# $1 is contract abi/bin name, $2 is go pkg name
abigen_files() {
mkdir -p $2/$3
./node_modules/.bin/abigen -abi ./genfiles/$1.abi -bin ./genfiles/$1.bin -pkg $3 -type $1 -out $2/$3/$4.go
}

Expand All @@ -53,8 +54,8 @@ sync_go_binding() {
echo sgn-contract PR Head Commit: $PR_COMMIT_ID
git status
echo "abigen files ..."
abigen_files DPoS bindings/go mainchain dpos
abigen_files SGN bindings/go mainchain sgn
abigen_files DPoS bindings/go sgncontracts dpos
abigen_files SGN bindings/go sgncontracts sgn
}

echo "update go binding ..."
Expand Down

0 comments on commit ac3f3c0

Please sign in to comment.