diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cccfffb..2195066 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,7 +5,7 @@ # the repo. Unless a later match takes precedence, # @global-owner1 and @global-owner2 will be requested for # review when someone opens a pull request. -* @jimni1222 @kjhman21 +* @jimni1222 @kjhman21 @kjeom @JayChoi1736 # Order is important; the last matching pattern takes the most # precedence. When someone opens a pull request that only diff --git a/.github/workflows/DEV.yaml b/.github/workflows/DEV.yaml index 28546e6..0f5015a 100644 --- a/.github/workflows/DEV.yaml +++ b/.github/workflows/DEV.yaml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.18.0' + go-version: '1.18' - name: download dependencies run: | go get ./... @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.18.0' + go-version: '1.18' - name: check format run: | make check-format @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.18.0' + go-version: '1.18' - name: check license run: | make check-license @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.18.0' + go-version: '1.18' - name: install dependency run: | go mod download github.com/client9/misspell @@ -79,7 +79,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.18.0' + go-version: '1.18' - name: build test run: | + go get -u go4.org/unsafe/assume-no-moving-gc make test diff --git a/configuration/configuration.go b/configuration/configuration.go index c56e5ae..03125d1 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -86,7 +86,7 @@ const ( SkipAdminEnv = "SKIP_ADMIN" // MiddlewareVersion is the version of rosetta-klaytn. - MiddlewareVersion = "1.0.5" + MiddlewareVersion = "1.0.7" ) // Configuration determines how diff --git a/go.mod b/go.mod index 18a749c..540bc6f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/klaytn/rosetta-klaytn require ( github.com/fatih/color v1.13.0 - github.com/klaytn/klaytn v1.10.1 + github.com/klaytn/klaytn v1.10.2 github.com/klaytn/rosetta-sdk-go-klaytn v0.7.10 github.com/spf13/cobra v1.5.0 github.com/stretchr/testify v1.8.0 diff --git a/go.sum b/go.sum index 22abad5..23eeabc 100644 --- a/go.sum +++ b/go.sum @@ -616,8 +616,8 @@ github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPR github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/reedsolomon v1.9.2/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/klaytn/klaytn v1.8.3/go.mod h1:bbf8dqgZn/cLZ+ns+N416knDMKVpyWuUfuOXACpCVH0= -github.com/klaytn/klaytn v1.10.1 h1:XXLP2DYO/0uAg51V0jeJyK+LMOO2vug8qzCSLVIgkSU= -github.com/klaytn/klaytn v1.10.1/go.mod h1:R8eUX9g0sXiiPnQMCDHlWOnDC4oJWWz/1pnudW+1u9c= +github.com/klaytn/klaytn v1.10.2 h1:AAmPn2fcuOTkprMLXkkpvo4uFwqcfAdFpvqBKKqXnNE= +github.com/klaytn/klaytn v1.10.2/go.mod h1:R8eUX9g0sXiiPnQMCDHlWOnDC4oJWWz/1pnudW+1u9c= github.com/klaytn/rosetta-sdk-go-klaytn v0.7.10 h1:ykCtbjVUQQ8NQbWRROXFunmTo81KIdmsujgOPDwPW0M= github.com/klaytn/rosetta-sdk-go-klaytn v0.7.10/go.mod h1:YS9Wj5EvKh7leQJYmtfomC6kMEaqNwjtys+zXbSz0hE= github.com/klaytn/xgo v0.0.0-20220420020737-0d7e3e080122/go.mod h1:1p9sFrvjHQrEknvDHha17xKMZMOqE73LNEGiBt3/3o0= diff --git a/klaytn/client.go b/klaytn/client.go index 79861d2..93a8813 100644 --- a/klaytn/client.go +++ b/klaytn/client.go @@ -1615,7 +1615,7 @@ func (kc *Client) getRewardAndRatioInfo( return nil, nil, nil, fmt.Errorf("could not convert minting amount type from %s", minted) } - // Call `governance_getStakingInfo` to get KIR and KGF addresses. + // Call `governance_getStakingInfo` to get KCF and KFF addresses. var stakingInfo reward.StakingInfo err = kc.c.CallContext(ctx, &stakingInfo, "governance_getStakingInfo", block) if err != nil { @@ -1627,8 +1627,7 @@ func (kc *Client) getRewardAndRatioInfo( rewardAddresses := []string{rewardbase} var kgfAddress, kirAddress string - // TODO-Klaytn: Have to use stakingInfo.KGFAddr instead of stakingInfo.PoCAddr - if common.EmptyAddress(stakingInfo.PoCAddr) { + if common.EmptyAddress(stakingInfo.KFFAddr) { kgfAddress = rewardbase rewardAddresses = append(rewardAddresses, "") } else { @@ -1636,11 +1635,11 @@ func (kc *Client) getRewardAndRatioInfo( // For more info, please check the below source code. // nolint:lll // https://github.com/klaytn/klaytn/blob/7584e71de602ce0367a4fb4e19643b49b076b93c/reward/reward_distributor.go#L116-L121 - kgfAddress = stakingInfo.PoCAddr.String() + kgfAddress = stakingInfo.KFFAddr.String() rewardAddresses = append(rewardAddresses, kgfAddress) } - if common.EmptyAddress(stakingInfo.KIRAddr) { + if common.EmptyAddress(stakingInfo.KCFAddr) { kirAddress = rewardbase rewardAddresses = append(rewardAddresses, "") } else { @@ -1648,7 +1647,7 @@ func (kc *Client) getRewardAndRatioInfo( // For more info, please check the below source code. // nolint:lll // https://github.com/klaytn/klaytn/blob/7584e71de602ce0367a4fb4e19643b49b076b93c/reward/reward_distributor.go#L123-L127 - kirAddress = stakingInfo.KIRAddr.String() + kirAddress = stakingInfo.KCFAddr.String() rewardAddresses = append(rewardAddresses, kirAddress) } diff --git a/services/network_service_test.go b/services/network_service_test.go index 7911043..3de8a3a 100644 --- a/services/network_service_test.go +++ b/services/network_service_test.go @@ -32,7 +32,7 @@ import ( var ( // rosetta-klaytn version - middlewareVersion = "1.0.5" + middlewareVersion = "1.0.7" defaultNetworkOptions = &types.NetworkOptionsResponse{ Version: &types.Version{