Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: update swagger docs & evm configration #2824

Merged
merged 3 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/BuildAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build-images:
name: Build Images
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/TestUnit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
test-unit:
name: Test Units
# runs-on: self-hosted
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
uploadAssets:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
Expand Down
16 changes: 8 additions & 8 deletions app/upgrades/v200/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
// NOTE: Before the release of irishub 2.0.0, the configuration in this file must be modified

const (
maxBlockGas = 40000000 // TODO
maxBlockGas = 40000000
)

var (
evmToken = types.EvmToken // TODO
evmToken = types.EvmToken
evmParams = etherminttypes.Params{
EvmDenom: evmToken.MinUnit,
EnableCreate: true,
Expand All @@ -27,12 +27,12 @@ var (
}

feemarketParams = feemarkettypes.Params{
NoBaseFee: false, // TODO
BaseFeeChangeDenominator: 8, // TODO
ElasticityMultiplier: 2, // TODO
BaseFee: math.NewInt(1000000000), // TODO
MinGasPrice: sdk.ZeroDec(), // TODO
MinGasMultiplier: sdk.NewDecWithPrec(5, 1), // TODO
NoBaseFee: false,
BaseFeeChangeDenominator: 8,
ElasticityMultiplier: 4,
BaseFee: math.NewInt(500000000000),
MinGasPrice: sdk.NewDecFromInt(math.NewInt(500000000000)),
MinGasMultiplier: sdk.NewDecWithPrec(5, 1),
}
)

Expand Down
12 changes: 2 additions & 10 deletions app/upgrades/v200/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"github.com/evmos/ethermint/x/feemarket"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

v1 "github.com/irisnet/irismod/modules/token/types/v1"

"github.com/irisnet/irishub/app/upgrades"
irisevm "github.com/irisnet/irishub/modules/evm"
)
Expand All @@ -42,17 +40,11 @@ func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upg
app.FeeMarketKeeper.SetParams(ctx, generateFeemarketParams(ctx.BlockHeight()))

//transfer token ownership
token, err := app.TokenKeeper.GetToken(ctx, evmToken.Symbol)
owner, err := sdk.AccAddressFromBech32(evmToken.Owner)
if err != nil {
return nil, err
}

tokenExp, ok := token.(*v1.Token)
if !ok {
return nil, fmt.Errorf("token is not *v1.Token")
}
tokenExp.Owner = evmToken.Owner
if err := app.TokenKeeper.UpdateToken(ctx, *tokenExp); err != nil {
if err := app.TokenKeeper.UnsafeTransferTokenOwner(ctx, evmToken.Symbol, owner); err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673
github.com/irisnet/irismod v1.7.3-rc1.0.20230404025348-fcbd060d7642
github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mq
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/informalsystems/tendermint v0.34.26 h1:89XvVexAy62geGWxmDmdmmJvfindx+Su2oTuwfSWMeU=
github.com/informalsystems/tendermint v0.34.26/go.mod h1:q3uAZ/t5+MblQhFuHSd4flqaLDx7iUtWpwWbwvHAFhs=
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673 h1:SeX7uK09rUyWrnJb+LGHjoZvx9zO1oUmzcAjfMdKlHk=
github.com/irisnet/irismod v1.7.3-rc1.0.20230403030851-b6879675c673/go.mod h1:B9WxUyCBkMRSaQ+LxXGKhyAPCXDaoXBv8/4T5SH1xR8=
github.com/irisnet/irismod v1.7.3-rc1.0.20230404025348-fcbd060d7642 h1:Kh0QizIHGysm1228TW1DMZk6UePFu/B07Ak1pNOr/9M=
github.com/irisnet/irismod v1.7.3-rc1.0.20230404025348-fcbd060d7642/go.mod h1:B9WxUyCBkMRSaQ+LxXGKhyAPCXDaoXBv8/4T5SH1xR8=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
Expand Down
2 changes: 1 addition & 1 deletion lite/statik/statik.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lite/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5689,7 +5689,7 @@ paths:
tags:
- Query
- Service
/irismod/service/requests/{request_context_id}/{batch_counter}:
/irismod/service/requests/contexts/{request_context_id}/{batch_counter}:
get:
summary: RequestsByReqCtx returns all requests of one service call batch
operationId: RequestsByReqCtx
Expand Down
2 changes: 1 addition & 1 deletion scripts/protoc-swagger-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chmod a+x ./scripts/protoc-swagger-gen-evm.sh
./scripts/protoc-swagger-gen-evm.sh

SDK_VERSION=v0.46.9
IRISMOD_VERSION=v1.7.3-rc1.0.20230323070532-5470e23e8e2e
IRISMOD_VERSION=v1.7.3-rc1.0.20230404025348-fcbd060d7642

go mod download github.com/cosmos/cosmos-sdk@${SDK_VERSION}
go mod download github.com/irisnet/irismod@${IRISMOD_VERSION}
Expand Down
9 changes: 4 additions & 5 deletions types/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package types

// MUST be loaded before running
import (
"math"
"os"
"path/filepath"

Expand Down Expand Up @@ -46,12 +45,12 @@ func init() {
}

EvmToken = tokenv1.Token{
Symbol: "eth",
Name: "Irishub evm token",
Symbol: "eris",
Name: "IRISHub EVM Fee Token",
Scale: 18,
MinUnit: "wei",
MinUnit: "weris",
InitialSupply: 0,
MaxSupply: math.MaxUint64,
MaxSupply: 10000000000,
Mintable: true,
Owner: sdk.AccAddress(crypto.AddressHash([]byte(tokentypes.ModuleName))).String(),
}
Expand Down