Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit f4192e3

Browse files
author
Silas Davis
committed
Upgrade to Go 1.16
Signed-off-by: Silas Davis <[email protected]>
1 parent b6820f7 commit f4192e3

29 files changed

+322
-273
lines changed

.github/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM golang:1.15-alpine3.13
1+
FROM golang:1.16-alpine3.13
22
MAINTAINER Monax <[email protected]>
33

4-
ENV DOCKER_VERSION "17.12.1-ce"
5-
ENV GORELEASER_VERSION "v0.104.1"
4+
ENV DOCKER_VERSION "20.10.6"
5+
ENV GORELEASER_VERSION "v0.166.1"
66
# This is the image used by the Circle CI config
77
# Update remote with 'make push_ci_image'
88
RUN apk add --update --no-cache \
@@ -22,8 +22,8 @@ RUN apk add --update --no-cache \
2222
libffi-dev \
2323
openssl-dev \
2424
python3-dev \
25-
py-pip
26-
RUN pip3 install docker-compose
25+
py-pip \
26+
docker-compose
2727
# get docker client
2828
WORKDIR /usr/bin
2929
RUN curl -sS -L https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_VERSION.tgz | tar xz --strip-components 1 docker/docker

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/setup-go@v1
1313
with:
14-
go-version: 1.15
14+
go-version: 1.16
1515
id: go
1616
- uses: actions/checkout@v2
1717
- run: make test

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- run: git fetch --prune --unshallow
1414
- uses: actions/setup-go@v1
1515
with:
16-
go-version: 1.15
16+
go-version: 1.16
1717
- uses: goreleaser/goreleaser-action@v1
1818
with:
1919
version: latest

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/setup-go@v1
1313
with:
14-
go-version: 1.15
14+
go-version: 1.16
1515
id: go
1616
- uses: actions/checkout@v2
1717
- run: git fetch --unshallow --prune
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/setup-go@v1
2929
with:
30-
go-version: 1.15
30+
go-version: 1.16
3131
id: go
3232
- uses: actions/checkout@v1
3333
- run: make test_integration

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# For solc binary
2-
FROM ethereum/solc:0.5.12 as solc-builder
2+
FROM ethereum/solc:0.5.15 as solc-builder
33
# We use a multistage build to avoid bloating our deployment image with build dependencies
4-
FROM golang:1.15-alpine3.12 as builder
4+
FROM golang:1.16-alpine3.13 as builder
55

66
RUN apk add --no-cache --update git bash make musl-dev gcc libc6-compat
77

@@ -13,7 +13,7 @@ WORKDIR $REPO
1313
RUN make build
1414

1515
# This will be our base container image
16-
FROM alpine:3.11
16+
FROM alpine:3.13
1717

1818
# Variable arguments to populate labels
1919
ARG USER=burrow

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REPO := $(shell pwd)
1515

1616
# Our own Go files containing the compiled bytecode of solidity files as a constant
1717

18-
export CI_IMAGE=hyperledger/burrow:ci-2
18+
export CI_IMAGE=hyperledger/burrow:ci-3
1919

2020
VERSION := $(shell scripts/version.sh)
2121
# Gets implicit default GOPATH if not set

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hyperledger/burrow
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/BurntSushi/toml v0.3.1
@@ -52,7 +52,7 @@ require (
5252
github.com/xlab/treeprint v1.0.0
5353
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
5454
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
55-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
55+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
5656
google.golang.org/grpc v1.35.0
5757
google.golang.org/protobuf v1.25.0
5858
gopkg.in/yaml.v2 v2.4.0

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.33.1-dev.e4b5f85b9",
2+
"version": "0.33.1-dev.4b4d42399",
33
"name": "@hyperledger/burrow",
44
"description": "TypeScript library that calls a Hyperledger Burrow server over GRPC.",
55
"main": "./dist/index.js",

js/src/contracts/abi.ts

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,37 @@ export type Address = string;
66

77
export type FunctionIO = FunctionInput & FunctionOutput;
88

9-
// TODO: replace with ethers js
9+
export namespace ABI {
10+
export type Func = {
11+
type: 'function' | 'constructor' | 'fallback';
12+
name: string;
13+
inputs?: Array<FunctionInput>;
14+
outputs?: Array<FunctionOutput>;
15+
stateMutability: 'pure' | 'view' | 'nonpayable' | 'payable';
16+
payable?: boolean;
17+
constant?: boolean;
18+
};
19+
20+
export type Event = {
21+
type: 'event';
22+
name: string;
23+
inputs: Array<EventInput>;
24+
anonymous: boolean;
25+
};
26+
27+
export type FunctionInput = {
28+
name: string;
29+
type: string;
30+
components?: FunctionInput[];
31+
internalType?: string;
32+
};
33+
34+
export type FunctionOutput = FunctionInput;
35+
export type EventInput = FunctionInput & { indexed?: boolean };
36+
37+
export type FunctionIO = FunctionInput & FunctionOutput;
38+
export type FunctionOrEvent = Func | Event;
39+
}
1040

1141
export function transformToFullName(abi: SolidityFunction | Event): string {
1242
if (abi.name.indexOf('(') !== -1) {
@@ -15,18 +45,3 @@ export function transformToFullName(abi: SolidityFunction | Event): string {
1545
const typeName = (abi.inputs as Array<EventInput | FunctionIO>).map((i) => i.type).join(',');
1646
return abi.name + '(' + typeName + ')';
1747
}
18-
19-
export function extractDisplayName(name: string): string {
20-
const length = name.indexOf('(');
21-
return length !== -1 ? name.substr(0, length) : name;
22-
}
23-
24-
export function extractTypeName(name: string): string {
25-
/// TODO: make it invulnerable
26-
const length = name.indexOf('(');
27-
return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : '';
28-
}
29-
30-
export function isFunction(abi: SolidityFunction | Event): abi is SolidityFunction {
31-
return abi.type === 'function' || abi.type === 'constructor';
32-
}
File renamed without changes.

0 commit comments

Comments
 (0)