Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit b770d62

Browse files
authored
Merge pull request #374 from klaytn/release/v1.11.1
[Master] release/v1.11.1 QA Sign-off
2 parents 570b0d4 + bf068c1 commit b770d62

12 files changed

Lines changed: 427 additions & 188 deletions

File tree

.circleci/config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ check_test_network: &check_test_network
6464
echo "Klaytn RPC server is up"
6565
break
6666
else
67-
echo "wait for Klyatn RPC server..."
67+
echo "wait for Klaytn RPC server..."
6868
sleep 5
6969
fi
7070
RETRY=$(($RETRY+5))
@@ -136,11 +136,17 @@ jobs:
136136
- *pull_klaytn_image
137137
- *start_test_network
138138
- *check_test_network
139+
- run:
140+
name: "Check environment"
141+
command: java --version && gradle --version
139142
- run:
140143
name: "Test"
141-
command: ./gradlew clean test --debug
144+
command: ./gradlew clean test --debug --scan
142145
- store_test_results:
143146
path: core/build/test-results/test
147+
- store_artifacts:
148+
path: /home/circleci/circleci-caver-java-major/core/build/reports/tests/test
149+
destination: test-output
144150

145151
build_test:
146152
<<: *machine_ubuntu
@@ -195,6 +201,9 @@ jobs:
195201
command: ./gradlew connectedDebugAndroidTest --debug --stacktrace
196202
- store_test_results:
197203
path: android_instrumented_test/build/outputs/androidTest-results/connected
204+
- store_artifacts:
205+
path: android_instrumented_test/build/reports/androidTests/connected/flavors/debugAndroidTest
206+
destination: /test-report
198207

199208
build_test_android:
200209
<<: *android_machine_ubuntu

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# @global-owner1 and @global-owner2 will be requested for
77
# review when someone opens a pull request.
88
#* @global-owner1 @global-owner2
9-
* @jimni1222 @kjeom @JayChoi1736 @henry-will @kjhman21
9+
* @kjeom @JayChoi1736 @kjhman21
1010

1111
# Order is important; the last matching pattern takes the most
1212
# precedence. When someone opens a pull request that only

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ apply plugin: 'io.codearte.nexus-staging'
3434

3535

3636
allprojects {
37-
version '1.10.2'
37+
version '1.11.1'
3838
group 'com.klaytn.caver'
3939
description 'caver-java project'
4040

core/src/main/java/com/klaytn/caver/JsonRpc2_0Klay.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,24 @@ public Request<?, Quantity> getGasPrice() {
462462
}
463463

464464
@Override
465-
public Request<?, Quantity> getGasPriceAt(DefaultBlockParameter defaultBlockParameter) {
465+
public Request<?, Quantity> getGasPrice(DefaultBlockParameter defaultBlockParameter) {
466466
return new Request<>(
467-
"klay_gasPriceAt",
467+
"klay_gasPrice",
468468
Arrays.asList(defaultBlockParameter),
469469
web3jService,
470-
Quantity.class
471-
);
470+
Quantity.class);
472471
}
473472

473+
// @Override
474+
// public Request<?, Quantity> getGasPriceAt(DefaultBlockParameter defaultBlockParameter) {
475+
// return new Request<>(
476+
// "klay_gasPriceAt",
477+
// Arrays.asList(defaultBlockParameter),
478+
// web3jService,
479+
// Quantity.class
480+
// );
481+
// }
482+
474483
@Override
475484
public Request<?, Boolean> isParallelDBWrite() {
476485
return new Request<>(

core/src/main/java/com/klaytn/caver/Klay.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,18 @@ Request<?, KlayTransaction> getTransactionByBlockNumberAndIndex(
408408
* @param defaultBlockParameter Integer block number, or the string "latest", "earliest" or "pending"
409409
* @return Quantity - Integer of the current gas price in peb.
410410
*/
411-
Request<?, Quantity> getGasPriceAt(DefaultBlockParameter defaultBlockParameter);
411+
Request<?, Quantity> getGasPrice(DefaultBlockParameter defaultBlockParameter);
412+
413+
414+
/**
415+
* Returns the unit price of the given block in peb.<br>
416+
* NOTE: This API has different behavior from Ethereum's and returns a gas price of Klaytn instead
417+
* of suggesting a gas price as in Ethereum.
418+
*
419+
* @param defaultBlockParameter Integer block number, or the string "latest", "earliest" or "pending"
420+
* @return Quantity - Integer of the current gas price in peb.
421+
*/
422+
// Request<?, Quantity> getGasPriceAt(DefaultBlockParameter defaultBlockParameter);
412423

413424

414425
/**
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright 2022 The caver-java Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the “License”);
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an “AS IS” BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.klaytn.caver.methods.response;
18+
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import java.util.Map;
21+
import org.web3j.protocol.core.Response;
22+
23+
public class ForkStatusResult
24+
extends Response<ForkStatusResult.ForkStatusData> {
25+
26+
public static class ForkStatusData {
27+
28+
@JsonProperty("EthTxType")
29+
private Boolean EthTxType;
30+
31+
@JsonProperty("Istanbul")
32+
private Boolean Istanbul;
33+
34+
@JsonProperty("KIP103")
35+
private Boolean KIP103;
36+
37+
@JsonProperty("Kore")
38+
private Boolean Kore;
39+
40+
@JsonProperty("London")
41+
private Boolean London;
42+
43+
@JsonProperty("Magma")
44+
private Boolean Magma;
45+
46+
@JsonProperty("Mantle")
47+
private Boolean Mantle;
48+
49+
public ForkStatusData() {}
50+
public ForkStatusData (
51+
Boolean EthTxType,
52+
Boolean Istanbul,
53+
Boolean KIP103,
54+
Boolean Kore,
55+
Boolean London,
56+
Boolean Magma,
57+
Boolean Mantle
58+
) {
59+
this.EthTxType = EthTxType;
60+
this.Istanbul = Istanbul;
61+
this.KIP103 = KIP103;
62+
this.Kore = Kore;
63+
this.London = London;
64+
this.Magma = Magma;
65+
this.Mantle = Mantle;
66+
}
67+
}
68+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Copyright 2020 The caver-java Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the “License”);
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an “AS IS” BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.klaytn.caver.methods.response;
18+
19+
import java.util.Map;
20+
21+
import org.web3j.protocol.core.Response;
22+
23+
import com.fasterxml.jackson.annotation.JsonProperty;
24+
25+
import java.util.List;
26+
27+
public class RewardsAccumulated extends Response<RewardsAccumulated.RewardsAccumulatedData> {
28+
public static class RewardsAccumulatedData {
29+
30+
@JsonProperty("firstBlockTime")
31+
private String firstBlockTime;
32+
33+
@JsonProperty("lastBlockTime")
34+
private String lastBlockTime;
35+
36+
@JsonProperty("firstBlock")
37+
private String firstBlock;
38+
39+
@JsonProperty("lastBlock")
40+
private String lastBlock;
41+
42+
@JsonProperty("totalMinted")
43+
private String totalMinted;
44+
45+
@JsonProperty("totalTxFee")
46+
private String totalTxFee;
47+
48+
@JsonProperty("totalBurntTxFee")
49+
private String totalBurntTxFee;
50+
51+
@JsonProperty("totalProposerRewards")
52+
private String totalProposerRewards;
53+
54+
@JsonProperty("totalStakingRewards")
55+
private String totalStakingRewards;
56+
57+
@JsonProperty("totalKFFRewards")
58+
private String totalKFFRewards;
59+
60+
@JsonProperty("totalKCFRewards")
61+
private String totalKCFRewards;
62+
63+
/**
64+
* mapping from reward recipient to amounts
65+
*/
66+
@JsonProperty("rewards")
67+
private Map<String, String> rewards;
68+
69+
public RewardsAccumulatedData() {}
70+
public RewardsAccumulatedData(
71+
String firstBlockTime,
72+
String lastBlockTime,
73+
String firstBlock,
74+
String lastBlock,
75+
String totalMinted,
76+
String totalTxFee,
77+
String totalBurntTxFee,
78+
String totalProposerRewards,
79+
String totalStakingRewards,
80+
String totalKFFRewards,
81+
String totalKCFRewards,
82+
Map<String, String> Rewards
83+
) {
84+
this.firstBlockTime = firstBlockTime;
85+
this.lastBlockTime = lastBlockTime;
86+
this.firstBlock = firstBlock;
87+
this.lastBlock = lastBlock;
88+
this.totalMinted = totalMinted;
89+
this.totalTxFee = totalTxFee;
90+
this.totalBurntTxFee = totalBurntTxFee;
91+
this.totalProposerRewards = totalProposerRewards;
92+
this.totalStakingRewards = totalStakingRewards;
93+
this.totalKFFRewards = totalKFFRewards;
94+
this.totalKCFRewards = totalKCFRewards;
95+
this.rewards = rewards;
96+
}
97+
}
98+
}

0 commit comments

Comments
 (0)