Skip to content

Commit 2caf2ab

Browse files
committed
votingStation txn withOpts
1 parent 76c5c21 commit 2caf2ab

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ build:
2929
-X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=$(TIME)'" \
3030
main.go
3131

32+
.PHONY: build-amd
33+
build-amd:
34+
$(eval LATEST_VERSION = $(shell git describe --tags --abbrev=0))
35+
$(eval COMMIT_HASH = $(shell git rev-parse HEAD))
36+
$(eval BRANCH = $(shell git rev-parse --abbrev-ref HEAD | tr -d '\040\011\012\015\n'))
37+
$(eval TIME = $(shell date))
38+
GOOS=linux GOARCH=amd64 go build -o main -ldflags="\
39+
-X 'github.com/0xPolygon/polygon-edge/versioning.Version=$(LATEST_VERSION)' \
40+
-X 'github.com/0xPolygon/polygon-edge/versioning.Commit=$(COMMIT_HASH)'\
41+
-X 'github.com/0xPolygon/polygon-edge/versioning.Branch=$(BRANCH)'\
42+
-X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=$(TIME)'" \
43+
main.go
44+
3245
.PHONY: lint
3346
lint:
3447
golangci-lint run --config .golangci.yml

command/ibft/propose/params.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ const (
4646
voteRemoveSCFunction = "function voteDrop(address oldValidator)"
4747
)
4848

49+
const (
50+
txGasPriceWei = 1000000000
51+
txGasLimitWei = 1000000
52+
)
53+
4954
type proposeParams struct {
5055
addressRaw string
5156
rawBLSPublicKey string
@@ -207,6 +212,13 @@ func (p *proposeParams) ibftSetVotingStationValidators(grpcAddress string, jsonr
207212
functionArgs...,
208213
)
209214

215+
txn.WithOpts(
216+
&contract.TxnOpts{
217+
GasPrice: (20 * txGasPriceWei),
218+
GasLimit: txGasLimitWei,
219+
},
220+
)
221+
210222
if txnErr != nil {
211223
fmt.Println(fmt.Errorf("failed to initiate voting-station txn %w", txnErr))
212224
return txnErr

0 commit comments

Comments
 (0)