From b17f89c82b9fd86f2915aff8e3722700cc191552 Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Tue, 10 Sep 2024 16:09:01 +0700 Subject: [PATCH 1/8] feat: base testing for web3py and web3j --- .../test/java/org/base/MockProviderTest.java | 4 ++ .../org/provider/ProviderExampleTest.java | 14 +++++ .../java/org/signer/SignerExampleTest.java | 14 +++++ .../test/java/org/utils/UtilsExampleTest.java | 15 +++++ .../web3py_ext/test/base_testing/__init__.py | 0 .../test/base_testing/mock_provider.py | 5 ++ .../web3py_ext/test/provider/__init__.py | 0 .../web3py_ext/test/provider/test_example.py | 56 +++++++++++++++++++ web3py-ext/web3py_ext/test/signer/__init__.py | 0 .../web3py_ext/test/signer/test_example.py | 54 ++++++++++++++++++ web3py-ext/web3py_ext/test/utils/__init__.py | 0 .../web3py_ext/test/utils/test_example.py | 54 ++++++++++++++++++ 12 files changed, 216 insertions(+) create mode 100644 web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java create mode 100644 web3py-ext/web3py_ext/test/base_testing/__init__.py create mode 100644 web3py-ext/web3py_ext/test/base_testing/mock_provider.py create mode 100644 web3py-ext/web3py_ext/test/provider/__init__.py create mode 100644 web3py-ext/web3py_ext/test/provider/test_example.py create mode 100644 web3py-ext/web3py_ext/test/signer/__init__.py create mode 100644 web3py-ext/web3py_ext/test/signer/test_example.py create mode 100644 web3py-ext/web3py_ext/test/utils/__init__.py create mode 100644 web3py-ext/web3py_ext/test/utils/test_example.py diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java b/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java new file mode 100644 index 000000000..3a13af7c4 --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java @@ -0,0 +1,4 @@ +package org.base; + +public class MockProviderTest { +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java new file mode 100644 index 000000000..e53ffdc8f --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java @@ -0,0 +1,14 @@ +package org.provider; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("ProviderExampleTest Example Tests") +public class ProviderExampleTest { + @Test + @DisplayName("example test provider") + void exampleTestCase() { + assertEquals(1,1); + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java new file mode 100644 index 000000000..33fc2d772 --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java @@ -0,0 +1,14 @@ +package org.signer; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("Signer Example Tests") +public class SignerExampleTest { + @Test + @DisplayName("example test signer") + void exampleTestCase() { + assertEquals(1,1); + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java new file mode 100644 index 000000000..8e05b3a81 --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java @@ -0,0 +1,15 @@ +package org.utils; + + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("Utils Example Tests") +public class UtilsExampleTest { + @Test + @DisplayName("example test utils") + void exampleTestCase() { + assertEquals(1,1); + } +} diff --git a/web3py-ext/web3py_ext/test/base_testing/__init__.py b/web3py-ext/web3py_ext/test/base_testing/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/web3py-ext/web3py_ext/test/base_testing/mock_provider.py b/web3py-ext/web3py_ext/test/base_testing/mock_provider.py new file mode 100644 index 000000000..eafe71285 --- /dev/null +++ b/web3py-ext/web3py_ext/test/base_testing/mock_provider.py @@ -0,0 +1,5 @@ + + +class MockProvider: + def __init__(self): + print('mock_provider') \ No newline at end of file diff --git a/web3py-ext/web3py_ext/test/provider/__init__.py b/web3py-ext/web3py_ext/test/provider/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/web3py-ext/web3py_ext/test/provider/test_example.py b/web3py-ext/web3py_ext/test/provider/test_example.py new file mode 100644 index 000000000..170a106ef --- /dev/null +++ b/web3py-ext/web3py_ext/test/provider/test_example.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +"""Unittest.""" + +import unittest +from base_testing.mock_provider import MockProvider + +def setUpModule(): + pass + + +def tearDownModule(): + pass + + +class TestProviderExample(unittest.TestCase): + + """Unittest.""" + + maxDiff, __slots__ = None, () + + def setUp(self): + """Method to prepare the test fixture. Run BEFORE the test methods.""" + pass + + def tearDown(self): + """Method to tear down the test fixture. Run AFTER the test methods.""" + pass + + def addCleanup(self, function, *args, **kwargs): + """Function called AFTER tearDown() to clean resources used on test.""" + pass + + @classmethod + def setUpClass(cls): + """Class method called BEFORE tests in an individual class run. """ + pass # Probably you may not use this one. See setUp(). + + @classmethod + def tearDownClass(cls): + """Class method called AFTER tests in an individual class run. """ + pass # Probably you may not use this one. See tearDown(). + + # tests. method starts with test_ + def test_example_ok(self): + self.assertEqual(1,1) + + @unittest.expectedFailure + def test_example_failed(self): + self.assertEqual(1,2) + + +if __name__.__contains__("__main__"): + print(__doc__) + unittest.main() \ No newline at end of file diff --git a/web3py-ext/web3py_ext/test/signer/__init__.py b/web3py-ext/web3py_ext/test/signer/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/web3py-ext/web3py_ext/test/signer/test_example.py b/web3py-ext/web3py_ext/test/signer/test_example.py new file mode 100644 index 000000000..efa4addfa --- /dev/null +++ b/web3py-ext/web3py_ext/test/signer/test_example.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +"""Unittest.""" + +import unittest + + +def setUpModule(): + pass + + +def tearDownModule(): + pass + + +class TestSignerExample(unittest.TestCase): + + """Unittest.""" + + def setUp(self): + """Method to prepare the test fixture. Run BEFORE the test methods.""" + pass + + def tearDown(self): + """Method to tear down the test fixture. Run AFTER the test methods.""" + pass + + def addCleanup(self, function, *args, **kwargs): + """Function called AFTER tearDown() to clean resources used on test.""" + pass + + @classmethod + def setUpClass(cls): + """Class method called BEFORE tests in an individual class run. """ + pass # Probably you may not use this one. See setUp(). + + @classmethod + def tearDownClass(cls): + """Class method called AFTER tests in an individual class run. """ + pass # Probably you may not use this one. See tearDown(). + + # tests. method starts with test_ + def test_example_ok(self): + self.assertEqual(1,1) + + @unittest.expectedFailure + def test_example_failed(self): + self.assertEqual(1,2) + + +if __name__.__contains__("__main__"): + print(__doc__) + unittest.main() \ No newline at end of file diff --git a/web3py-ext/web3py_ext/test/utils/__init__.py b/web3py-ext/web3py_ext/test/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/web3py-ext/web3py_ext/test/utils/test_example.py b/web3py-ext/web3py_ext/test/utils/test_example.py new file mode 100644 index 000000000..610a6da74 --- /dev/null +++ b/web3py-ext/web3py_ext/test/utils/test_example.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +"""Unittest.""" + +import unittest + + +def setUpModule(): + pass + + +def tearDownModule(): + pass + + +class TestUtilsExample(unittest.TestCase): + + """Unittest.""" + + def setUp(self): + """Method to prepare the test fixture. Run BEFORE the test methods.""" + pass + + def tearDown(self): + """Method to tear down the test fixture. Run AFTER the test methods.""" + pass + + def addCleanup(self, function, *args, **kwargs): + """Function called AFTER tearDown() to clean resources used on test.""" + pass + + @classmethod + def setUpClass(cls): + """Class method called BEFORE tests in an individual class run. """ + pass # Probably you may not use this one. See setUp(). + + @classmethod + def tearDownClass(cls): + """Class method called AFTER tests in an individual class run. """ + pass # Probably you may not use this one. See tearDown(). + + # tests. method starts with test_ + def test_example_ok(self): + self.assertEqual(1,1) + + @unittest.expectedFailure + def test_example_failed(self): + self.assertEqual(1,2) + + +if __name__.__contains__("__main__"): + print(__doc__) + unittest.main() \ No newline at end of file From 7f5dc598066073edc71440b070f41fcc449114f3 Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Wed, 11 Sep 2024 16:28:51 +0700 Subject: [PATCH 2/8] feat: update unit-tests web3py-ext --- .../test/base_testing/base_testing.py | 14 +++++++ .../test/base_testing/mock_provider.py | 5 --- .../test_provider.py} | 23 ++++------- .../test_example.py => signer/test_signer.py} | 38 ++++++++++--------- .../test_example.py => utils/test_utils.py} | 29 +++++++------- 5 files changed, 57 insertions(+), 52 deletions(-) create mode 100644 web3py-ext/web3py_ext/test/base_testing/base_testing.py delete mode 100644 web3py-ext/web3py_ext/test/base_testing/mock_provider.py rename web3py-ext/web3py_ext/test/{utils/test_example.py => provider/test_provider.py} (71%) rename web3py-ext/web3py_ext/test/{provider/test_example.py => signer/test_signer.py} (53%) rename web3py-ext/web3py_ext/test/{signer/test_example.py => utils/test_utils.py} (67%) diff --git a/web3py-ext/web3py_ext/test/base_testing/base_testing.py b/web3py-ext/web3py_ext/test/base_testing/base_testing.py new file mode 100644 index 000000000..443da272c --- /dev/null +++ b/web3py-ext/web3py_ext/test/base_testing/base_testing.py @@ -0,0 +1,14 @@ +from web3 import Web3 +from eth_account import Account +import unittest + + +class BaseTesting(unittest.TestCase): + """Unittest.""" + + def setUp(self): + """Method to prepare the test fixture. Run BEFORE the test methods.""" + self.web3 = Web3(Web3.HTTPProvider( + 'https://public-en-baobab.klaytn.net')) + self.user = Account.from_key( + '0x0e4ca6d38096ad99324de0dde108587e5d7c600165ae4cd6c2462c597458c2b8') diff --git a/web3py-ext/web3py_ext/test/base_testing/mock_provider.py b/web3py-ext/web3py_ext/test/base_testing/mock_provider.py deleted file mode 100644 index eafe71285..000000000 --- a/web3py-ext/web3py_ext/test/base_testing/mock_provider.py +++ /dev/null @@ -1,5 +0,0 @@ - - -class MockProvider: - def __init__(self): - print('mock_provider') \ No newline at end of file diff --git a/web3py-ext/web3py_ext/test/utils/test_example.py b/web3py-ext/web3py_ext/test/provider/test_provider.py similarity index 71% rename from web3py-ext/web3py_ext/test/utils/test_example.py rename to web3py-ext/web3py_ext/test/provider/test_provider.py index 610a6da74..9e2aa2aed 100644 --- a/web3py-ext/web3py_ext/test/utils/test_example.py +++ b/web3py-ext/web3py_ext/test/provider/test_provider.py @@ -2,8 +2,9 @@ # -*- coding: utf-8 -*- """Unittest.""" - +from web3py_ext import extend import unittest +from base_testing.base_testing import BaseTesting def setUpModule(): @@ -14,13 +15,7 @@ def tearDownModule(): pass -class TestUtilsExample(unittest.TestCase): - - """Unittest.""" - - def setUp(self): - """Method to prepare the test fixture. Run BEFORE the test methods.""" - pass +class TestProvider(BaseTesting): def tearDown(self): """Method to tear down the test fixture. Run AFTER the test methods.""" @@ -41,14 +36,12 @@ def tearDownClass(cls): pass # Probably you may not use this one. See tearDown(). # tests. method starts with test_ - def test_example_ok(self): - self.assertEqual(1,1) - - @unittest.expectedFailure - def test_example_failed(self): - self.assertEqual(1,2) + def test_kaia_namespace(self): + # test if kaia namespace is intergrated by calling one of its functions. + block_number = self.web3.kaia.chain_id() + self.assertEqual(block_number, '0x3e9') if __name__.__contains__("__main__"): print(__doc__) - unittest.main() \ No newline at end of file + unittest.main() diff --git a/web3py-ext/web3py_ext/test/provider/test_example.py b/web3py-ext/web3py_ext/test/signer/test_signer.py similarity index 53% rename from web3py-ext/web3py_ext/test/provider/test_example.py rename to web3py-ext/web3py_ext/test/signer/test_signer.py index 170a106ef..39a5304b5 100644 --- a/web3py-ext/web3py_ext/test/provider/test_example.py +++ b/web3py-ext/web3py_ext/test/signer/test_signer.py @@ -2,9 +2,15 @@ # -*- coding: utf-8 -*- """Unittest.""" - +from web3py_ext import extend +from web3 import Web3 +from eth_account import Account +from web3py_ext.transaction.transaction import ( + fill_transaction, +) import unittest -from base_testing.mock_provider import MockProvider +from base_testing.base_testing import BaseTesting + def setUpModule(): pass @@ -14,15 +20,7 @@ def tearDownModule(): pass -class TestProviderExample(unittest.TestCase): - - """Unittest.""" - - maxDiff, __slots__ = None, () - - def setUp(self): - """Method to prepare the test fixture. Run BEFORE the test methods.""" - pass +class TestSigner(BaseTesting): def tearDown(self): """Method to tear down the test fixture. Run AFTER the test methods.""" @@ -43,14 +41,20 @@ def tearDownClass(cls): pass # Probably you may not use this one. See tearDown(). # tests. method starts with test_ - def test_example_ok(self): - self.assertEqual(1,1) + def test_sign_transaction(self): + value_transfer_tx = { + 'from': self.user.address, + 'to': self.user.address, + 'value': Web3.to_peb(10, "klay"), + } + value_transfer_tx = fill_transaction(value_transfer_tx, self.web3) + signed_tx = Account.sign_transaction(value_transfer_tx, self.user.key) - @unittest.expectedFailure - def test_example_failed(self): - self.assertEqual(1,2) + self.assertIsInstance(signed_tx.r, int) + self.assertIsInstance(signed_tx.s, int) + self.assertIsInstance(signed_tx.v, int) if __name__.__contains__("__main__"): print(__doc__) - unittest.main() \ No newline at end of file + unittest.main() diff --git a/web3py-ext/web3py_ext/test/signer/test_example.py b/web3py-ext/web3py_ext/test/utils/test_utils.py similarity index 67% rename from web3py-ext/web3py_ext/test/signer/test_example.py rename to web3py-ext/web3py_ext/test/utils/test_utils.py index efa4addfa..3719f8a10 100644 --- a/web3py-ext/web3py_ext/test/signer/test_example.py +++ b/web3py-ext/web3py_ext/test/utils/test_utils.py @@ -2,8 +2,17 @@ # -*- coding: utf-8 -*- """Unittest.""" - +from web3py_ext import extend +from web3 import Web3 +from eth_account import Account +from web3py_ext.transaction.transaction import ( + fill_transaction, +) +from web3py_ext.transaction.transaction import ( + TxType +) import unittest +from base_testing.base_testing import BaseTesting def setUpModule(): @@ -14,13 +23,7 @@ def tearDownModule(): pass -class TestSignerExample(unittest.TestCase): - - """Unittest.""" - - def setUp(self): - """Method to prepare the test fixture. Run BEFORE the test methods.""" - pass +class TestUtils(BaseTesting): def tearDown(self): """Method to tear down the test fixture. Run AFTER the test methods.""" @@ -41,14 +44,10 @@ def tearDownClass(cls): pass # Probably you may not use this one. See tearDown(). # tests. method starts with test_ - def test_example_ok(self): - self.assertEqual(1,1) - - @unittest.expectedFailure - def test_example_failed(self): - self.assertEqual(1,2) + def test_units_conversion(self): + self.assertEqual(Web3.to_peb(0.1, "klay"), 100000000000000000) if __name__.__contains__("__main__"): print(__doc__) - unittest.main() \ No newline at end of file + unittest.main() From 6d04911fdccad38d92920c6b6d0c459cc51febdc Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Wed, 11 Sep 2024 16:53:24 +0700 Subject: [PATCH 3/8] feat: update unit-tests web3j-ext --- .../src/test/java/org/base/BaseTesting.java | 19 +++++++++++++++ .../test/java/org/base/MockProviderTest.java | 4 ---- .../org/provider/ProviderExampleTest.java | 14 ----------- .../test/java/org/provider/ProviderTest.java | 20 ++++++++++++++++ .../java/org/signer/SignerExampleTest.java | 14 ----------- .../src/test/java/org/signer/SignerTest.java | 23 +++++++++++++++++++ .../test/java/org/utils/UtilsExampleTest.java | 15 ------------ .../src/test/java/org/utils/UtilsTest.java | 17 ++++++++++++++ 8 files changed, 79 insertions(+), 47 deletions(-) create mode 100644 web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java delete mode 100644 web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java delete mode 100644 web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java delete mode 100644 web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java delete mode 100644 web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java create mode 100644 web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java new file mode 100644 index 000000000..6dd896f5d --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java @@ -0,0 +1,19 @@ +package org.base; + +import org.web3j.crypto.KaiaCredentials; +import org.web3j.example.keySample; +import org.web3j.protocol.http.HttpService; +import org.web3j.protocol.kaia.Web3j; + +public abstract class BaseTesting { + private final Web3j web3j = Web3j.build(new HttpService(keySample.BAOBAB_URL)); + private final KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + + public Web3j getWeb3j() { + return web3j; + } + + public KaiaCredentials getCredentials() { + return credentials; + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java b/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java deleted file mode 100644 index 3a13af7c4..000000000 --- a/web3j-ext/web3j-ext/src/test/java/org/base/MockProviderTest.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.base; - -public class MockProviderTest { -} diff --git a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java deleted file mode 100644 index e53ffdc8f..000000000 --- a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderExampleTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.provider; - -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -@DisplayName("ProviderExampleTest Example Tests") -public class ProviderExampleTest { - @Test - @DisplayName("example test provider") - void exampleTestCase() { - assertEquals(1,1); - } -} diff --git a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java new file mode 100644 index 000000000..cf06cbd6d --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java @@ -0,0 +1,20 @@ +package org.provider; + +import org.base.BaseTesting; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.web3j.protocol.kaia.core.method.response.KaiaChainIDResponse; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("Provider Tests") +public class ProviderTest extends BaseTesting { + @Test + @DisplayName("test kaia namespace") + void testKaiaNamespace() throws IOException { + KaiaChainIDResponse chainId = this.getWeb3j().kaiaChainID().send(); + assertEquals(chainId.getResult(), "0x3e9"); + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java deleted file mode 100644 index 33fc2d772..000000000 --- a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerExampleTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.signer; - -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -@DisplayName("Signer Example Tests") -public class SignerExampleTest { - @Test - @DisplayName("example test signer") - void exampleTestCase() { - assertEquals(1,1); - } -} diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java new file mode 100644 index 000000000..bb19a3fc3 --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java @@ -0,0 +1,23 @@ +package org.signer; + +import org.base.BaseTesting; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.web3j.crypto.KaiaSignatureData; +import org.web3j.crypto.Sign; + +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("Signer Tests") +public class SignerTest extends BaseTesting { + @Test + @DisplayName("test signPrefixedMessage") + void exampleTestCase() { + String message = "0xdeadbeef"; + + Sign.SignatureData signature = KaiaSignatureData.signPrefixedMessage(message, this.getCredentials()); + String result = KaiaSignatureData.getSignatureString(signature); + + assertNotNull(result); + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java deleted file mode 100644 index 8e05b3a81..000000000 --- a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsExampleTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.utils; - - -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -@DisplayName("Utils Example Tests") -public class UtilsExampleTest { - @Test - @DisplayName("example test utils") - void exampleTestCase() { - assertEquals(1,1); - } -} diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java new file mode 100644 index 000000000..b189191d3 --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java @@ -0,0 +1,17 @@ +package org.utils; + +import org.base.BaseTesting; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.web3j.crypto.transaction.type.TxType.Type; + +import static org.junit.jupiter.api.Assertions.*; + +@DisplayName("Utils Tests") +public class UtilsTest extends BaseTesting { + @Test + @DisplayName("example test utils") + void testUnitConversion() { + assertNotNull(Type.ACCOUNT_UPDATE); + } +} From 805f4931d207d56acc69bcd9fa3310d6d85eb1d8 Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Wed, 11 Sep 2024 16:55:05 +0700 Subject: [PATCH 4/8] fix: testcase name --- web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java | 2 +- web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java index bb19a3fc3..46fdf4d16 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java @@ -12,7 +12,7 @@ public class SignerTest extends BaseTesting { @Test @DisplayName("test signPrefixedMessage") - void exampleTestCase() { + void testSignPrefixedMessage() { String message = "0xdeadbeef"; Sign.SignatureData signature = KaiaSignatureData.signPrefixedMessage(message, this.getCredentials()); diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java index b189191d3..a1999e3a2 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java @@ -10,8 +10,8 @@ @DisplayName("Utils Tests") public class UtilsTest extends BaseTesting { @Test - @DisplayName("example test utils") - void testUnitConversion() { + @DisplayName("test Type") + void testType() { assertNotNull(Type.ACCOUNT_UPDATE); } } From 703cd5bf4ffd1a71b76246c1b8339bd384a7191a Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Thu, 12 Sep 2024 09:16:56 +0700 Subject: [PATCH 5/8] fix: change unit-tests rpc links --- .../web3j-ext/src/main/java/org/web3j/example/keySample.java | 2 +- web3py-ext/web3py_ext/test/base_testing/base_testing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/keySample.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/keySample.java index 5f0ebf03c..4fbdd9c7f 100644 --- a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/keySample.java +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/keySample.java @@ -1,7 +1,7 @@ package org.web3j.example; public interface keySample { - String BAOBAB_URL = "https://public-en-baobab.klaytn.net"; + String BAOBAB_URL = "https://public-en-kairos.node.kaia.io"; String LEGACY_KEY_address = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; String LEGACY_KEY_privkey = "0x0e4ca6d38096ad99324de0dde108587e5d7c600165ae4cd6c2462c597458c2b8"; String LEGACY_KEY_FEEPAYER_address = "0xcb0eb737dfda52756495a5e08a9b37aab3b271da"; diff --git a/web3py-ext/web3py_ext/test/base_testing/base_testing.py b/web3py-ext/web3py_ext/test/base_testing/base_testing.py index 443da272c..82ceeabfb 100644 --- a/web3py-ext/web3py_ext/test/base_testing/base_testing.py +++ b/web3py-ext/web3py_ext/test/base_testing/base_testing.py @@ -9,6 +9,6 @@ class BaseTesting(unittest.TestCase): def setUp(self): """Method to prepare the test fixture. Run BEFORE the test methods.""" self.web3 = Web3(Web3.HTTPProvider( - 'https://public-en-baobab.klaytn.net')) + 'https://public-en-kairos.node.kaia.io')) self.user = Account.from_key( '0x0e4ca6d38096ad99324de0dde108587e5d7c600165ae4cd6c2462c597458c2b8') From 59719758949274c053ed3c34e4b80c81319459a0 Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Thu, 19 Sep 2024 17:30:13 +0700 Subject: [PATCH 6/8] feat: unit-test for web3j-ext --- web3j-ext/web3j-ext/build.gradle | 1 + .../src/test/java/org/base/BaseTesting.java | 14 +- .../test/java/org/provider/ProviderTest.java | 91 +++++++++- .../src/test/java/org/signer/SignerTest.java | 155 +++++++++++++++++- 4 files changed, 252 insertions(+), 9 deletions(-) diff --git a/web3j-ext/web3j-ext/build.gradle b/web3j-ext/web3j-ext/build.gradle index e77f6f978..a21bb8af2 100644 --- a/web3j-ext/web3j-ext/build.gradle +++ b/web3j-ext/web3j-ext/build.gradle @@ -21,6 +21,7 @@ dependencies { implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.14.2' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' + testImplementation 'org.mockito:mockito-core:5.9.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' implementation 'org.json:json:20230618' diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java index 6dd896f5d..a1cc93a88 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java +++ b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java @@ -1,18 +1,28 @@ package org.base; +import org.mockito.Mockito; import org.web3j.crypto.KaiaCredentials; import org.web3j.example.keySample; +import org.web3j.protocol.Web3jService; import org.web3j.protocol.http.HttpService; import org.web3j.protocol.kaia.Web3j; + + public abstract class BaseTesting { + private final Web3jService web3jService=Mockito.mock(HttpService.class); + private final Web3j mockedWeb3j = Web3j.build(web3jService); private final Web3j web3j = Web3j.build(new HttpService(keySample.BAOBAB_URL)); private final KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); - + public Web3j getMockedWeb3j() { + return mockedWeb3j; + } public Web3j getWeb3j() { return web3j; } - + public Web3jService getWeb3jService() { + return web3jService; + } public KaiaCredentials getCredentials() { return credentials; } diff --git a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java index cf06cbd6d..eaff89159 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java @@ -3,18 +3,99 @@ import org.base.BaseTesting; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import org.web3j.protocol.kaia.core.method.response.KaiaChainIDResponse; +import org.web3j.protocol.core.Request; +import org.web3j.protocol.kaia.core.method.response.*; import java.io.IOException; +import static org.mockito.Mockito.*; import static org.junit.jupiter.api.Assertions.*; @DisplayName("Provider Tests") public class ProviderTest extends BaseTesting { @Test - @DisplayName("test kaia namespace") - void testKaiaNamespace() throws IOException { - KaiaChainIDResponse chainId = this.getWeb3j().kaiaChainID().send(); - assertEquals(chainId.getResult(), "0x3e9"); + @DisplayName("test kaia/klay namespace") + void testKaiaAndKlayNamespace() throws IOException { + KaiaChainIDResponse mockKaiaChainIdResponse=new KaiaChainIDResponse(); + mockKaiaChainIdResponse.setId(123); + + + KlayChainIDResponse mockKlayChainIdResponse=new KlayChainIDResponse(); + mockKlayChainIdResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockKaiaChainIdResponse); + KaiaChainIDResponse kaiaChainId = this.getMockedWeb3j().kaiaChainID().send(); + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockKlayChainIdResponse); + KlayChainIDResponse klayChainId= this.getMockedWeb3j().klayChainID().send(); + assertEquals(kaiaChainId.getId(), 123); + assertEquals(klayChainId.getId(), 123); + } + @Test + @DisplayName("test admin namespace") + void testAdminNamespace() throws IOException { + + AdminNodeConfigResponse mockedResponse=new AdminNodeConfigResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + AdminNodeConfigResponse response=this.getMockedWeb3j().adminNodeConfig().send(); + + assertEquals(response.getId(),123); + } + @Test + @DisplayName("test net namespace") + void testNetNamespace() throws IOException { + NetNetworkIDResponse mockedResponse=new NetNetworkIDResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + NetNetworkIDResponse response=this.getMockedWeb3j().netNetworkID().send(); + + assertEquals(response.getId(),123); + } + @Test + @DisplayName("test personal namespace") + void testPersonalNamespace() throws IOException { + + PersonalListAccountsResponse mockedResponse=new PersonalListAccountsResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + PersonalListAccountsResponse response=this.getMockedWeb3j().personalListAccounts().send(); + + assertEquals(response.getId(),123); + } + @Test + @DisplayName("test governance namespace") + void testGovernanceNamespace() throws IOException { + GovernanceGetChainConfigResponse mockedResponse=new GovernanceGetChainConfigResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + GovernanceGetChainConfigResponse response=this.getMockedWeb3j().governanceGetChainConfig().send(); + + assertEquals(response.getId(),123); + } + @Test + @DisplayName("test debug namespace") + void testDebugNamespace() throws IOException { + DebugGcStatsResponse mockedResponse=new DebugGcStatsResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + DebugGcStatsResponse response=this.getMockedWeb3j().debugGcStats().send(); + + assertEquals(response.getId(),123); + } + @Test + @DisplayName("test txPool namespace") + void testTxPoolNamespace() throws IOException { + TxpoolInspectResponse mockedResponse=new TxpoolInspectResponse(); + mockedResponse.setId(123); + + when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); + TxpoolInspectResponse response=this.getMockedWeb3j().txpoolInspect().send(); + + assertEquals(response.getId(),123); } } diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java index 46fdf4d16..6d897268b 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java @@ -3,8 +3,16 @@ import org.base.BaseTesting; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import org.web3j.crypto.KaiaSignatureData; -import org.web3j.crypto.Sign; +import org.web3j.crypto.*; +import org.web3j.crypto.transaction.type.TxType; +import org.web3j.example.keySample; +import org.web3j.protocol.core.DefaultBlockParameterName; +import org.web3j.protocol.core.methods.response.EthChainId; +import org.web3j.protocol.core.methods.response.EthSendTransaction; +import org.web3j.utils.Numeric; + +import java.io.IOException; +import java.math.BigInteger; import static org.junit.jupiter.api.Assertions.*; @@ -20,4 +28,147 @@ void testSignPrefixedMessage() { assertNotNull(result); } + + @Test + @DisplayName("test signTransaction") + void testSignTransaction() throws IOException { + KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + + BigInteger GAS_PRICE = BigInteger.valueOf(50000000000L); + BigInteger GAS_LIMIT = BigInteger.valueOf(6721950); + String from = credentials.getAddress(); + EthChainId EthchainId = this.getWeb3j().ethChainId().send(); + long chainId = EthchainId.getChainId().longValue(); + String to = "0x000000000000000000000000000000000000dead"; + BigInteger nonce = this.getWeb3j().ethGetTransactionCount(from, DefaultBlockParameterName.LATEST).send() + .getTransactionCount(); + BigInteger value = BigInteger.valueOf(100); + + TxType.Type type = TxType.Type.VALUE_TRANSFER; + + KaiaRawTransaction raw = KaiaRawTransaction.createTransaction( + type, + nonce, + GAS_PRICE, + GAS_LIMIT, + to, + value, + from); + + byte[] signedMessage = KaiaTransactionEncoder.signMessage(raw, chainId, credentials); + String hexValue = Numeric.toHexString(signedMessage); + + assertNotNull(hexValue); + } + @Test + @DisplayName("test signTransactionAsFeePayer") + void testSignTransactionAsFeePayer() throws IOException { + KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + KaiaCredentials credentials_feepayer = KaiaCredentials.create(keySample.LEGACY_KEY_FEEPAYER_privkey); + + BigInteger GAS_PRICE = BigInteger.valueOf(50000000000L); + BigInteger GAS_LIMIT = BigInteger.valueOf(6721950); + String from = credentials.getAddress(); + EthChainId EthchainId = this.getWeb3j().ethChainId().send(); + long chainId = EthchainId.getChainId().longValue(); + String to = "0x000000000000000000000000000000000000dead"; + BigInteger nonce = this.getWeb3j().ethGetTransactionCount(from, DefaultBlockParameterName.LATEST).send() + .getTransactionCount(); + BigInteger value = BigInteger.valueOf(100); + + TxType.Type type = TxType.Type.FEE_DELEGATED_VALUE_TRANSFER; + + KaiaRawTransaction raw = KaiaRawTransaction.createTransaction( + type, + nonce, + GAS_PRICE, + GAS_LIMIT, + to, + value, + from); + + // Sign as sender + byte[] signedMessage = KaiaTransactionEncoder.signMessage(raw, chainId, credentials); + + // Sign same message as Fee payer + signedMessage = KaiaTransactionEncoder.signMessageAsFeePayer(raw, chainId, credentials_feepayer); + + String hexValue = Numeric.toHexString(signedMessage); + + assertNotNull(hexValue); + } + @Test + @DisplayName("test sendTransaction") + void testSendTransaction() throws IOException { + KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + + BigInteger GAS_PRICE = BigInteger.valueOf(50000000000L); + BigInteger GAS_LIMIT = BigInteger.valueOf(6721950); + String from = credentials.getAddress(); + EthChainId EthchainId = this.getWeb3j().ethChainId().send(); + long chainId = EthchainId.getChainId().longValue(); + String to = "0x000000000000000000000000000000000000dead"; + BigInteger nonce = this.getWeb3j().ethGetTransactionCount(from, DefaultBlockParameterName.LATEST).send() + .getTransactionCount(); + BigInteger value = BigInteger.valueOf(100); + + TxType.Type type = TxType.Type.VALUE_TRANSFER; + + KaiaRawTransaction raw = KaiaRawTransaction.createTransaction( + type, + nonce, + GAS_PRICE, + GAS_LIMIT, + to, + value, + from); + + byte[] signedMessage = KaiaTransactionEncoder.signMessage(raw, chainId, credentials); + String hexValue = Numeric.toHexString(signedMessage); + EthSendTransaction transactionResponse = this.getWeb3j().ethSendRawTransaction(hexValue).send(); + String txHash = transactionResponse.getResult(); + assertNotNull(txHash); + } + @Test + @DisplayName("test sendTransactionAsFeePayer") + void testSendTransactionAsFeePayer() throws IOException { + KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + KaiaCredentials credentials_feepayer = KaiaCredentials.create(keySample.LEGACY_KEY_FEEPAYER_privkey); + + BigInteger GAS_PRICE = BigInteger.valueOf(50000000000L); + BigInteger GAS_LIMIT = BigInteger.valueOf(6721950); + String from = credentials.getAddress(); + EthChainId EthchainId = this.getWeb3j().ethChainId().send(); + long chainId = EthchainId.getChainId().longValue(); + String to = "0x000000000000000000000000000000000000dead"; + BigInteger nonce = this.getWeb3j().ethGetTransactionCount(from, DefaultBlockParameterName.LATEST).send() + .getTransactionCount(); + BigInteger value = BigInteger.valueOf(100); + + TxType.Type type = TxType.Type.FEE_DELEGATED_VALUE_TRANSFER; + + KaiaRawTransaction raw = KaiaRawTransaction.createTransaction( + type, + nonce, + GAS_PRICE, + GAS_LIMIT, + to, + value, + from); + + // Sign as sender + byte[] signedMessage = KaiaTransactionEncoder.signMessage(raw, chainId, credentials); + + // Sign same message as Fee payer + signedMessage = KaiaTransactionEncoder.signMessageAsFeePayer(raw, chainId, credentials_feepayer); + + String hexValue = Numeric.toHexString(signedMessage); + + EthSendTransaction transactionResponse = this.getWeb3j().ethSendRawTransaction(hexValue).send(); + String txHash = transactionResponse.getResult(); + assertNotNull(txHash); + } + + } + From 2d3bbc56277add1a6683b5f7573468bcb5684bd7 Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Fri, 20 Sep 2024 15:41:30 +0700 Subject: [PATCH 7/8] feat: add unit-test for web3j-ext signer provider utils --- .../src/test/java/org/base/BaseTesting.java | 7 +- .../src/test/java/org/base/UtilsHelper.java | 24 +++++ .../test/java/org/provider/ProviderTest.java | 69 ++++++++------ .../src/test/java/org/signer/SignerTest.java | 32 ++++++- .../src/test/java/org/utils/UtilsTest.java | 94 ++++++++++++++++++- 5 files changed, 187 insertions(+), 39 deletions(-) create mode 100644 web3j-ext/web3j-ext/src/test/java/org/base/UtilsHelper.java diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java index a1cc93a88..de5953594 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java +++ b/web3j-ext/web3j-ext/src/test/java/org/base/BaseTesting.java @@ -8,21 +8,24 @@ import org.web3j.protocol.kaia.Web3j; - public abstract class BaseTesting { - private final Web3jService web3jService=Mockito.mock(HttpService.class); + private final Web3jService web3jService = Mockito.mock(HttpService.class); private final Web3j mockedWeb3j = Web3j.build(web3jService); private final Web3j web3j = Web3j.build(new HttpService(keySample.BAOBAB_URL)); private final KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + public Web3j getMockedWeb3j() { return mockedWeb3j; } + public Web3j getWeb3j() { return web3j; } + public Web3jService getWeb3jService() { return web3jService; } + public KaiaCredentials getCredentials() { return credentials; } diff --git a/web3j-ext/web3j-ext/src/test/java/org/base/UtilsHelper.java b/web3j-ext/web3j-ext/src/test/java/org/base/UtilsHelper.java new file mode 100644 index 000000000..b1db7f5ca --- /dev/null +++ b/web3j-ext/web3j-ext/src/test/java/org/base/UtilsHelper.java @@ -0,0 +1,24 @@ +package org.base; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.stream.Collectors; + +public class UtilsHelper { + public static String getResourceJSON(String resourcePath) throws IOException { + InputStream inputStream = UtilsHelper.class.getResourceAsStream(resourcePath); + if (inputStream == null) { + throw new IllegalArgumentException("resource not found: " + resourcePath); + } + + try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) { + return reader.lines().collect(Collectors.joining(System.lineSeparator())); + + } catch (IOException e) { + throw e; + } + } +} diff --git a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java index eaff89159..a4213ad40 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/provider/ProviderTest.java @@ -7,95 +7,102 @@ import org.web3j.protocol.kaia.core.method.response.*; import java.io.IOException; -import static org.mockito.Mockito.*; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.when; @DisplayName("Provider Tests") public class ProviderTest extends BaseTesting { @Test @DisplayName("test kaia/klay namespace") void testKaiaAndKlayNamespace() throws IOException { - KaiaChainIDResponse mockKaiaChainIdResponse=new KaiaChainIDResponse(); + KaiaChainIDResponse mockKaiaChainIdResponse = new KaiaChainIDResponse(); mockKaiaChainIdResponse.setId(123); - KlayChainIDResponse mockKlayChainIdResponse=new KlayChainIDResponse(); + KlayChainIDResponse mockKlayChainIdResponse = new KlayChainIDResponse(); mockKlayChainIdResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockKaiaChainIdResponse); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockKaiaChainIdResponse); KaiaChainIDResponse kaiaChainId = this.getMockedWeb3j().kaiaChainID().send(); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockKlayChainIdResponse); - KlayChainIDResponse klayChainId= this.getMockedWeb3j().klayChainID().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockKlayChainIdResponse); + KlayChainIDResponse klayChainId = this.getMockedWeb3j().klayChainID().send(); assertEquals(kaiaChainId.getId(), 123); assertEquals(klayChainId.getId(), 123); } + @Test @DisplayName("test admin namespace") void testAdminNamespace() throws IOException { - AdminNodeConfigResponse mockedResponse=new AdminNodeConfigResponse(); + AdminNodeConfigResponse mockedResponse = new AdminNodeConfigResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - AdminNodeConfigResponse response=this.getMockedWeb3j().adminNodeConfig().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + AdminNodeConfigResponse response = this.getMockedWeb3j().adminNodeConfig().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } + @Test @DisplayName("test net namespace") void testNetNamespace() throws IOException { - NetNetworkIDResponse mockedResponse=new NetNetworkIDResponse(); + NetNetworkIDResponse mockedResponse = new NetNetworkIDResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - NetNetworkIDResponse response=this.getMockedWeb3j().netNetworkID().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + NetNetworkIDResponse response = this.getMockedWeb3j().netNetworkID().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } + @Test @DisplayName("test personal namespace") void testPersonalNamespace() throws IOException { - PersonalListAccountsResponse mockedResponse=new PersonalListAccountsResponse(); + PersonalListAccountsResponse mockedResponse = new PersonalListAccountsResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - PersonalListAccountsResponse response=this.getMockedWeb3j().personalListAccounts().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + PersonalListAccountsResponse response = this.getMockedWeb3j().personalListAccounts().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } + @Test @DisplayName("test governance namespace") void testGovernanceNamespace() throws IOException { - GovernanceGetChainConfigResponse mockedResponse=new GovernanceGetChainConfigResponse(); + GovernanceGetChainConfigResponse mockedResponse = new GovernanceGetChainConfigResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - GovernanceGetChainConfigResponse response=this.getMockedWeb3j().governanceGetChainConfig().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + GovernanceGetChainConfigResponse response = this.getMockedWeb3j().governanceGetChainConfig().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } + @Test @DisplayName("test debug namespace") void testDebugNamespace() throws IOException { - DebugGcStatsResponse mockedResponse=new DebugGcStatsResponse(); + DebugGcStatsResponse mockedResponse = new DebugGcStatsResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - DebugGcStatsResponse response=this.getMockedWeb3j().debugGcStats().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + DebugGcStatsResponse response = this.getMockedWeb3j().debugGcStats().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } + @Test @DisplayName("test txPool namespace") void testTxPoolNamespace() throws IOException { - TxpoolInspectResponse mockedResponse=new TxpoolInspectResponse(); + TxpoolInspectResponse mockedResponse = new TxpoolInspectResponse(); mockedResponse.setId(123); - when(this.getWeb3jService().send(any(Request.class),any())).thenReturn(mockedResponse); - TxpoolInspectResponse response=this.getMockedWeb3j().txpoolInspect().send(); + when(this.getWeb3jService().send(any(Request.class), any())).thenReturn(mockedResponse); + TxpoolInspectResponse response = this.getMockedWeb3j().txpoolInspect().send(); - assertEquals(response.getId(),123); + assertEquals(response.getId(), 123); } } diff --git a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java index 6d897268b..2356ecedd 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/signer/SignerTest.java @@ -14,7 +14,8 @@ import java.io.IOException; import java.math.BigInteger; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; @DisplayName("Signer Tests") public class SignerTest extends BaseTesting { @@ -60,6 +61,7 @@ void testSignTransaction() throws IOException { assertNotNull(hexValue); } + @Test @DisplayName("test signTransactionAsFeePayer") void testSignTransactionAsFeePayer() throws IOException { @@ -97,6 +99,7 @@ void testSignTransactionAsFeePayer() throws IOException { assertNotNull(hexValue); } + @Test @DisplayName("test sendTransaction") void testSendTransaction() throws IOException { @@ -129,6 +132,7 @@ void testSendTransaction() throws IOException { String txHash = transactionResponse.getResult(); assertNotNull(txHash); } + @Test @DisplayName("test sendTransactionAsFeePayer") void testSendTransactionAsFeePayer() throws IOException { @@ -169,6 +173,32 @@ void testSendTransactionAsFeePayer() throws IOException { assertNotNull(txHash); } + @Test + @DisplayName("test fillTransaction") + void testFillTransaction() throws IOException { + BigInteger GAS_PRICE = BigInteger.ZERO; + BigInteger GAS_LIMIT = BigInteger.ZERO; + String from = keySample.LEGACY_KEY_address; + String to = "0x000000000000000000000000000000000000dead"; + BigInteger value = BigInteger.valueOf(100); + + TxType.Type type = TxType.Type.FEE_DELEGATED_VALUE_TRANSFER; + + KaiaRawTransaction raw = KaiaRawTransaction.createTransaction( + type, + BigInteger.ZERO, + GAS_PRICE, + GAS_LIMIT, + to, + value, + from); + + KaiaRawTransaction filledTransaction = raw.fillTransaction(this.getWeb3j()); + + assertNotEquals(filledTransaction.getNonce(), BigInteger.ZERO); + assertNotEquals(filledTransaction.getGasPrice(), BigInteger.ZERO); + } + } diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java index a1999e3a2..687ecd22c 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java @@ -1,17 +1,101 @@ package org.utils; import org.base.BaseTesting; +import org.base.UtilsHelper; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.web3j.crypto.CipherException; +import org.web3j.crypto.KaiaCredentials; +import org.web3j.crypto.KaiaWelletUtils; import org.web3j.crypto.transaction.type.TxType.Type; +import org.web3j.example.keySample; +import org.web3j.kaiaAccount.AccountStore; +import org.web3j.kaiaAccount.Accounts; +import org.web3j.utils.BytesUtils; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; import static org.junit.jupiter.api.Assertions.*; @DisplayName("Utils Tests") public class UtilsTest extends BaseTesting { - @Test - @DisplayName("test Type") - void testType() { - assertNotNull(Type.ACCOUNT_UPDATE); - } + @Test + @DisplayName("test Constants") + void testConstants() { + assertNotNull(Type.ACCOUNT_UPDATE); + } + + @Test + @DisplayName("test Keystore v3") + void testKeystoreV3() throws CipherException, IOException { + String password = "Iloveklaytn"; + + String[] keyFiles = {"/Legacy_V3.json", "/Public_V3.json"}; + for (String keyFile : keyFiles) { + + String json = UtilsHelper.getResourceJSON(keyFile); + + // Convert keystore to list of KaiaCredentials + KaiaCredentials credentials = KaiaWelletUtils.loadJsonKaiaCredentials(password, json); + String address = credentials.getAddress(); + String privateKey = credentials.getEcKeyPair().getPrivateKey().toString(16); + assertNotNull(address); + assertNotNull(privateKey); + } + } + + @Test + @DisplayName("test Keystore v4") + void testKeyStoreV4() throws Exception { + String password = "Iloveklaytn"; + + String[] keyFiles = {"/RoleBased_V4.json", "/Multi_V4.json", "/Public_V4.json"}; + for (String keyFile : keyFiles) { + + String json = UtilsHelper.getResourceJSON(keyFile); + + // Convert keystore to list of KaiaCredentials + List> credentialsLists = KaiaWelletUtils.loadJsonKaiaCredentialsFromV4(password, + json); + + for (List credentialsList : credentialsLists) { + for (KaiaCredentials credentials : credentialsList) { + String address = credentials.getAddress(); + String privateKey = credentials.getEcKeyPair().getPrivateKey().toString(16); + assertNotNull(address); + assertNotNull(privateKey); + } + } + } + + } + + @Test + @DisplayName("test accountStore") + void testAccountStore() throws IOException { + KaiaCredentials credentials = KaiaCredentials.create(keySample.LEGACY_KEY_privkey); + + Accounts accounts = new Accounts(); + accounts.add(credentials); + + AccountStore accStore = new AccountStore(); + accStore.refresh(this.getWeb3j(), accounts); + + assertNotNull(accStore.getAccountInfo(keySample.LEGACY_KEY_address).get("address")); + assertEquals(keySample.LEGACY_KEY_address, accStore.getAccountInfo(keySample.LEGACY_KEY_address).get("address")); + } + + @Test + @DisplayName("test Helpers") + void testHelper() { + assertTrue(BytesUtils.isHexStrict("0x123")); + assertFalse(BytesUtils.isHexStrict("123")); + byte[] left = {1, 2, 3}; + byte[] right = {4, 5, 6}; + assertEquals(Arrays.toString(BytesUtils.concat(left, right)), "[1, 2, 3, 4, 5, 6]"); + } + } + From d50d55bd36dd22967f018be7b3ec42ae4d7b861c Mon Sep 17 00:00:00 2001 From: Sotatek-TanHoang Date: Mon, 30 Sep 2024 16:45:24 +0700 Subject: [PATCH 8/8] fix: update keystore credentials for web3j --- .../utils/DecryptKeystoreV3Example.java | 2 +- .../utils/DecryptKeystoreV4Example.java | 2 +- .../src/main/resources/Legacy_V3.json | 20 ++++---- .../src/main/resources/Multi_V4.json | 48 +++++++++---------- .../src/main/resources/Public_V3.json | 40 ++++++++-------- .../src/main/resources/Public_V4.json | 38 +++++++-------- .../src/main/resources/RoleBased_V4.json | 48 +++++++++---------- .../src/test/java/org/utils/UtilsTest.java | 5 +- .../components/schemas/common/Common.yaml | 6 +-- .../common/KlaytnTransactionTypes.yaml | 2 +- web3rpc/rpc-specs/paths/admin/addPeer.yaml | 2 +- web3rpc/rpc-specs/paths/admin/datadir.yaml | 2 +- .../rpc-specs/paths/admin/importChain.yaml | 2 +- .../paths/admin/importChainFromString.yaml | 2 +- web3rpc/rpc-specs/paths/admin/nodeInfo.yaml | 4 +- web3rpc/rpc-specs/paths/admin/peers.yaml | 6 +-- web3rpc/rpc-specs/paths/admin/removePeer.yaml | 2 +- .../paths/admin/saveTrieNodeCacheToDisk.yaml | 2 +- .../admin/setMaxSubscriptionPerWSConn.yaml | 2 +- .../paths/admin/startStateMigration.yaml | 2 +- .../blockchainInspection/getBlockRlp.yaml | 2 +- .../blockchainInspection/printBlock.yaml | 2 +- .../block/getUncleByBlockHashAndIndex.yaml | 2 +- .../block/getUncleByBlockNumberAndIndex.yaml | 2 +- .../eth/block/getUncleCountByBlockHash.yaml | 2 +- .../eth/block/getUncleCountByBlockNumber.yaml | 2 +- .../paths/eth/filter/getFilterLogs.yaml | 2 +- .../rpc-specs/paths/eth/filter/getLogs.yaml | 2 +- .../rpc-specs/paths/eth/filter/newFilter.yaml | 5 +- .../paths/eth/gas/maxPriorityFeePerGas.yaml | 2 +- .../paths/eth/miscellaneous/getHashrate.yaml | 2 +- .../paths/eth/miscellaneous/getWork.yaml | 2 +- .../paths/eth/miscellaneous/hashrate.yaml | 2 +- .../eth/miscellaneous/submitHashrate.yaml | 2 +- .../paths/eth/miscellaneous/submitWork.yaml | 2 +- .../eth/transaction/fillTransaction.yaml | 4 +- .../eth/transaction/sendTransaction.yaml | 6 +-- .../eth/transaction/signTransaction.yaml | 8 ++-- .../paths/governance/chainConfig.yaml | 2 +- .../paths/governance/getChainConfig.yaml | 2 +- .../rpc-specs/paths/governance/getParams.yaml | 4 +- .../rpc-specs/paths/governance/itemsAt.yaml | 4 +- .../paths/kaia/account/accountCreated.yaml | 2 +- .../paths/kaia/account/getAccount.yaml | 4 +- .../paths/kaia/account/getAccountKey.yaml | 2 +- .../paths/kaia/account/getBalance.yaml | 2 +- .../rpc-specs/paths/kaia/account/getCode.yaml | 2 +- .../kaia/account/getTransactionCount.yaml | 2 +- .../paths/kaia/account/isContractAccount.yaml | 2 +- .../paths/kaia/block/getBlockByNumber.yaml | 2 +- .../getBlockTransactionCountByNumber.yaml | 2 +- .../getBlockWithConsensusInfoByNumber.yaml | 2 +- .../paths/kaia/block/getCommittee.yaml | 2 +- .../paths/kaia/block/getCommitteeSize.yaml | 2 +- .../paths/kaia/block/getCouncil.yaml | 2 +- .../paths/kaia/block/getCouncilSize.yaml | 2 +- .../paths/kaia/block/getHeaderByHash.yaml | 2 +- .../paths/kaia/block/getHeaderByNumber.yaml | 2 +- .../paths/kaia/block/getStorageAt.yaml | 2 +- .../kaia/configuration/clientVersion.yaml | 8 ++-- .../kaia/configuration/protocolVersion.yaml | 6 +-- .../paths/kaia/filter/getFilterLogs.yaml | 2 +- .../rpc-specs/paths/kaia/filter/getLogs.yaml | 4 +- .../paths/kaia/filter/newFilter.yaml | 5 +- .../rpc-specs/paths/kaia/gas/feeHistory.yaml | 2 +- .../paths/kaia/gas/maxPriorityFeePerGas.yaml | 2 +- .../paths/kaia/transaction/call.yaml | 2 +- .../transaction/estimateComputationCost.yaml | 2 +- .../paths/kaia/transaction/estimateGas.yaml | 2 +- .../getTransactionByBlockNumberAndIndex.yaml | 2 +- .../kaia/transaction/sendTransaction.yaml | 2 +- .../sendTransactionAsFeePayer.yaml | 2 +- .../kaia/transaction/signTransaction.yaml | 2 +- .../signTransactionAsFeePayer.yaml | 2 +- .../paths/klay/account/accountCreated.yaml | 2 +- .../paths/klay/account/getAccount.yaml | 4 +- .../paths/klay/account/getAccountKey.yaml | 2 +- .../paths/klay/account/getBalance.yaml | 2 +- .../rpc-specs/paths/klay/account/getCode.yaml | 2 +- .../klay/account/getTransactionCount.yaml | 2 +- .../paths/klay/account/isContractAccount.yaml | 2 +- .../paths/klay/block/getBlockByNumber.yaml | 2 +- .../getBlockTransactionCountByNumber.yaml | 2 +- .../getBlockWithConsensusInfoByNumber.yaml | 2 +- .../paths/klay/block/getCommittee.yaml | 2 +- .../paths/klay/block/getCommitteeSize.yaml | 2 +- .../paths/klay/block/getCouncil.yaml | 2 +- .../paths/klay/block/getCouncilSize.yaml | 2 +- .../paths/klay/block/getHeaderByHash.yaml | 2 +- .../paths/klay/block/getHeaderByNumber.yaml | 2 +- .../paths/klay/block/getStorageAt.yaml | 2 +- .../klay/configuration/clientVersion.yaml | 8 ++-- .../klay/configuration/protocolVersion.yaml | 6 +-- .../paths/klay/filter/getFilterLogs.yaml | 2 +- .../rpc-specs/paths/klay/filter/getLogs.yaml | 4 +- .../paths/klay/filter/newFilter.yaml | 5 +- .../rpc-specs/paths/klay/gas/feeHistory.yaml | 2 +- .../paths/klay/transaction/call.yaml | 2 +- .../transaction/estimateComputationCost.yaml | 2 +- .../paths/klay/transaction/estimateGas.yaml | 2 +- .../getTransactionByBlockNumberAndIndex.yaml | 2 +- .../klay/transaction/sendTransaction.yaml | 2 +- .../sendTransactionAsFeePayer.yaml | 2 +- .../klay/transaction/signTransaction.yaml | 2 +- .../signTransactionAsFeePayer.yaml | 2 +- .../rpc-specs/paths/mainbridge/addPeer.yaml | 2 +- .../rpc-specs/paths/mainbridge/nodeInfo.yaml | 4 +- .../paths/mainbridge/removePeer.yaml | 2 +- web3rpc/rpc-specs/paths/net/networkID.yaml | 2 +- web3rpc/rpc-specs/paths/net/version.yaml | 6 +-- .../paths/personal/importRawKey.yaml | 6 +-- .../paths/personal/listAccounts.yaml | 6 +-- .../rpc-specs/paths/personal/newAccount.yaml | 2 +- .../paths/personal/replaceRawKey.yaml | 6 +-- .../paths/personal/unlockAccount.yaml | 2 +- .../rpc-specs/paths/subbridge/nodeInfo.yaml | 2 +- 116 files changed, 250 insertions(+), 250 deletions(-) diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV3Example.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV3Example.java index b748b8947..366ba092e 100644 --- a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV3Example.java +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV3Example.java @@ -15,7 +15,7 @@ public class DecryptKeystoreV3Example implements keySample { public static void run() throws Exception { - String password = "Iloveklaytn"; + String password = "Ilovekaia"; String[] keyFiles = { "/Legacy_V3.json", "/Public_V3.json" }; for (String keyFile : keyFiles) { diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV4Example.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV4Example.java index 388ed5d31..4fd9efe9f 100644 --- a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV4Example.java +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/DecryptKeystoreV4Example.java @@ -16,7 +16,7 @@ public class DecryptKeystoreV4Example implements keySample { public static void run() throws Exception { - String password = "Iloveklaytn"; + String password = "Ilovekaia"; String[] keyFiles = { "/RoleBased_V4.json", "/Multi_V4.json", "/Public_V4.json" }; for (String keyFile : keyFiles) { diff --git a/web3j-ext/web3j-ext/src/main/resources/Legacy_V3.json b/web3j-ext/web3j-ext/src/main/resources/Legacy_V3.json index e6ac87638..826d8cec9 100644 --- a/web3j-ext/web3j-ext/src/main/resources/Legacy_V3.json +++ b/web3j-ext/web3j-ext/src/main/resources/Legacy_V3.json @@ -1,21 +1,21 @@ { + "address": "a2a8854b1802d8cd5de631e690817c253d6a9153", + "id": "4459e0d8-93be-4c65-b44f-3dcea47b54a1", "version": 3, - "id": "1966f7fd-04cf-4e69-8b57-95f0e15ee7fe", - "address": "0xa2a8854b1802d8cd5de631e690817c253d6a9153", "crypto": { - "ciphertext": "ee49c9aa1dfc1ca29cb4054bc56179b25b88b883c7d07d37328ef2a82707aa37", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "719daf4baf464d2f207dcde23ae69dde" + "iv": "dd8d15c77b440974169e13ba902e289e" }, - "cipher": "aes-128-ctr", + "ciphertext": "d6b33f73022e00ab6d0ef20726ecbe5e0d6a9f6f05738d46cf91457ceeba300d", "kdf": "scrypt", "kdfparams": { + "salt": "68aee420df049cc6a9d9e12ebe352bad745142d55bfb9cc447c957d150d947af", + "n": 131072, "dklen": 32, - "salt": "31993d471d09cbdb609f14fee9913177a8536a510787bbe024d2c6a749d9db60", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "e499623cbe2fde3373deb03d3f438f95959f84d9d59c304c86070c17569e383a" + "mac": "ae7d318bcf4cb77df5112624710e4efdbd9f88229337a265327e927a14830000" } } \ No newline at end of file diff --git a/web3j-ext/web3j-ext/src/main/resources/Multi_V4.json b/web3j-ext/web3j-ext/src/main/resources/Multi_V4.json index 00e21c89a..dc2c50880 100644 --- a/web3j-ext/web3j-ext/src/main/resources/Multi_V4.json +++ b/web3j-ext/web3j-ext/src/main/resources/Multi_V4.json @@ -4,52 +4,52 @@ "address": "0x82c6a8d94993d49cfd0c1d30f0f8caa65782cc7e", "keyring": [ { - "ciphertext": "886853c592d16b2d38a18a7ee6b1bd2022b1191c8e89206e8c11e5538b3f814b", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "ceeab31b8827e241a2bf250b73b27285" + "iv": "4574beb59061ad7468bdc8eb34537b8a" }, - "cipher": "aes-128-ctr", + "ciphertext": "8ffd6e3a2117d302a73ada9e4dcf1f9fdb5abb7235c4f6fd0b68936a75e2dad7", "kdf": "scrypt", "kdfparams": { + "salt": "27d83dfb9c49cfccefae5c7331a4f394245e3efe0af4fe11d965d48f934c22bf", + "n": 131072, "dklen": 32, - "salt": "0acb0532ca4664816d6943f536e7b1935b04329e9306ee112ca381de190a88b8", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "5b9884ca045d56b9863086f126eecf427e4538ffbfa76f015d32e057927a0f0e" + "mac": "da00139784fafee5bf386a1b07f29817611370827e3861ac1d888804fc79b8dd" }, { - "ciphertext": "61bfbb38f728b32a5defbe2e36b04250e973987b0440a2a30f22552dfac01ea3", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "1b2f6914c98d62a02b74a686ddbcb992" + "iv": "daca766c9f465a51936989c9c50289ba" }, - "cipher": "aes-128-ctr", + "ciphertext": "68207226dbb6e7b999d15cefa7a28cf64f77d362d12a8488eaf9d685f298db8d", "kdf": "scrypt", "kdfparams": { + "salt": "a671ac0a72c86d94e9594452417807e8dff260f59b1a99a42cbb2e8b019f7806", + "n": 131072, "dklen": 32, - "salt": "84318760fbe438ce2142ffc24da58f79d870532d4fe90eadc582ad88939f9c80", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "156bce45310cc2a7b0e888b2d4e6d935de168475fdca833f34103fbea229c264" + "mac": "1d06107c9a5e6a6dcd4e4ba724d4a7c815bd5f5bcff42c5fe4e7c675ce448005" }, { - "ciphertext": "54af3e0695a3e5eecf64d15d0329d93f504b815bc043e06172e36aac4583c2aa", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "ff34109a7360af1d79a8415b53f6f57a" + "iv": "f4110bfd86da032a30a57cbbfae0da12" }, - "cipher": "aes-128-ctr", + "ciphertext": "ed77cd42e1f908b5dd2c4c809c2121165d6e98c131d1a1218b7f3826a1de031e", "kdf": "scrypt", "kdfparams": { + "salt": "6e85cd8a111bbb56d34a4a7e89b7a3d5447094854ac0fc18c3e8fe3b3c564cbc", + "n": 131072, "dklen": 32, - "salt": "5b293e4fc0655f5c4ca360b017b8098089beab8df64955f4f86295c186e26034", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "22fc08cb12d508744af7767fda9ccf56078f98fa926e5b62112feea839cd7182" + "mac": "dabe400a32f21bc085028979f8767be7c47e3b0d8d210e0df01fbe95a0a94a90" } ] } \ No newline at end of file diff --git a/web3j-ext/web3j-ext/src/main/resources/Public_V3.json b/web3j-ext/web3j-ext/src/main/resources/Public_V3.json index 4dd598db7..975dcb2e1 100644 --- a/web3j-ext/web3j-ext/src/main/resources/Public_V3.json +++ b/web3j-ext/web3j-ext/src/main/resources/Public_V3.json @@ -1,21 +1,21 @@ { - "version": 3, - "id": "ced74d01-9e19-4f72-8aa8-ea95430ca238", - "address": "0xe15cd70a41dfb05e7214004d7d054801b2a2f06b", - "crypto": { - "ciphertext": "c16a1768b399fe8533a33f527b8aa1a00a1a718586608e2e0bc0b6bdd0dac208", - "cipherparams": { - "iv": "f490dd33cad381d0b00f3412f3136eb7" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "e37aec3ea5e9cb4c1a5f253427721a979d247405c5c34a536db7bae2fa3b7df1", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "6da0b34f47c3344c9628fe2eb757bfc42018552e78cf30ad211f21ee5909b11b" - } - } \ No newline at end of file + "version": 3, + "id": "dc228b64-ae1e-4776-8b13-5ac5d7d218f6", + "address": "a2a8854b1802d8cd5de631e690817c253d6a9153", + "crypto": { + "ciphertext": "680a9af1dac1304bb4528f4a9f3f99162640850ed1126ae34d1727aab86c296b", + "cipherparams": { + "iv": "26e1eb656892ecfb576c05504dfe91f5" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "n": 8192, + "r": 8, + "p": 1, + "dklen": 32, + "salt": "ae4623b3571a686deccfd8aef081d6ff1328489a7fe3e788f4e9c2560edce3e5" + }, + "mac": "cfe014b19812af4a39c7302718f52b85bf3e50fc483c800129ea59daaec2bd11" + } +} \ No newline at end of file diff --git a/web3j-ext/web3j-ext/src/main/resources/Public_V4.json b/web3j-ext/web3j-ext/src/main/resources/Public_V4.json index 610b11441..967dd0e6b 100644 --- a/web3j-ext/web3j-ext/src/main/resources/Public_V4.json +++ b/web3j-ext/web3j-ext/src/main/resources/Public_V4.json @@ -1,23 +1,21 @@ { "version": 4, - "id": "fa42ad5d-d8bf-4508-8e30-b1ff6f6f659a", - "address": "0xe15cd70a41dfb05e7214004d7d054801b2a2f06b", - "keyring": [ - { - "ciphertext": "a6e941470090476fd37a72c82c789de8ceece73bef9272ff994166a62295dc2b", - "cipherparams": { - "iv": "eae71af6f63ea0142a9a744cf50dabd6" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "40b7a6a1b20799e17efd7682cd37a2f5305b628ecf5ced72913ea2d6f29ddd9e", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "c94f50c185d3fb8faa55ee6e285a3373684d3454529fd043a54217b0095a80ab" - } - ] + "id": "04384fe3-1f19-4551-8f4c-2a48e9cca213", + "address": "a2a8854b1802d8cd5de631e690817c253d6a9153", + "keyring": [{ + "ciphertext": "4b1e6c4d7ceb8913a3e5b6dce644cbbbf4b83172c9fa521a2ffb10087adec78a", + "cipherparams": { + "iv": "965cefe5668f0db8cf719d7e964d67f4" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "n": 8192, + "r": 8, + "p": 1, + "dklen": 32, + "salt": "23a10a97c98fd0283462d5cf08a6b9218ec8f509fedfaf34a84f203f9e928678" + }, + "mac": "6bbc7e1a3fe9369ba270dc3a6aeeaeb51c520d29ab75b3d3c3350c60d603b2d8" + }] } \ No newline at end of file diff --git a/web3j-ext/web3j-ext/src/main/resources/RoleBased_V4.json b/web3j-ext/web3j-ext/src/main/resources/RoleBased_V4.json index d80b7c75a..1e98609be 100644 --- a/web3j-ext/web3j-ext/src/main/resources/RoleBased_V4.json +++ b/web3j-ext/web3j-ext/src/main/resources/RoleBased_V4.json @@ -5,56 +5,56 @@ "keyring": [ [ { - "ciphertext": "992452cfa2b07e0e1494e6a9893db328ec77feb861a88ced36aafcc61834d86b", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "38d8fbb04aecc96a7eb588f8d057ac83" + "iv": "fac50c712f0ee4cbf995830514433085" }, - "cipher": "aes-128-ctr", + "ciphertext": "53f42c4f16cb8e8cddcd33a566e7d6b07615c59a4bc2ba185fbc0ceda5b78e25", "kdf": "scrypt", "kdfparams": { + "salt": "76498b572270309ef6fc360faa08d313ac6ca1f25bb16ddcf74745f208a93435", + "n": 131072, "dklen": 32, - "salt": "9df721827cbff1dcd5b5a3985afccbb56ff84bb12022a59ee4b0ea37c24942da", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "6023d947acd1ebc8f34bae8a733b6405858e53f8c97f9c0336f98b6283e810ad" + "mac": "0dce36e7effe655df06fdfde9aa8c58353f13218ffdbf4ec743aa47033335ac1" } ], [ { - "ciphertext": "38ee5237a23582afac237754186826871eefa1aa39fb399f1ee1a65bd9c718ad", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "e001671a06e858d73d909ba46fe19b9c" + "iv": "2f84b60ea850050d2efaff45eb9c9de1" }, - "cipher": "aes-128-ctr", + "ciphertext": "bcecf3a4daa6bba3d48773df9b0d6dab1e7ea5f411493b655006f7a257ab6c55", "kdf": "scrypt", "kdfparams": { + "salt": "187577c7b884a88e8eb82c4a5ace49db33ebb60a8054a484a5f0e1fd54c3617b", + "n": 131072, "dklen": 32, - "salt": "76aec3736e47b6a65f1bc9ade9671b543dbed97c1900ac425e833097751a165f", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "f650635cf9ea93d57a876f47a777f98463a8f588bb223d8dc169b601987c7f7c" + "mac": "e864602a136bfcf14d626bc3e89c668c93d27ae779616622a22cbcaea276a9ba" } ], [ { - "ciphertext": "6c206c11b728761cd37532dd22d4525e05da1048c174f163d5665ee7e5b5284b", + "cipher": "aes-128-ctr", "cipherparams": { - "iv": "07455721fc33c9aaf7730197ec946207" + "iv": "ba5603d4ec2acca070a18a8dc38d38a3" }, - "cipher": "aes-128-ctr", + "ciphertext": "32f9c338e788cc6fe4f875805e5d9d227393b9ffbabd2f353426f18d9bff14ed", "kdf": "scrypt", "kdfparams": { + "salt": "c21a76f31c746599ecca8a347a0279234c2d99bce20d4e4528a33672161e3574", + "n": 131072, "dklen": 32, - "salt": "b6bac6390f645eaf134a64cd401148c0e809897c29e8da1a7b3e33c3ed45e11a", - "n": 4096, - "r": 8, - "p": 1 + "p": 1, + "r": 8 }, - "mac": "83cc501c13f1397fb958cda7075e07cf388c417dd601ffb609cf4bc9e588ce02" + "mac": "ac3ee9cf09e54661a3d3f2eaa3a47b162053d486404af85ad3d3ee8aa9aac397" } ] ] diff --git a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java index 687ecd22c..3c9e3b160 100644 --- a/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java +++ b/web3j-ext/web3j-ext/src/test/java/org/utils/UtilsTest.java @@ -30,7 +30,7 @@ void testConstants() { @Test @DisplayName("test Keystore v3") void testKeystoreV3() throws CipherException, IOException { - String password = "Iloveklaytn"; + String password = "Ilovekaia"; String[] keyFiles = {"/Legacy_V3.json", "/Public_V3.json"}; for (String keyFile : keyFiles) { @@ -49,8 +49,7 @@ void testKeystoreV3() throws CipherException, IOException { @Test @DisplayName("test Keystore v4") void testKeyStoreV4() throws Exception { - String password = "Iloveklaytn"; - + String password = "Ilovekaia"; String[] keyFiles = {"/RoleBased_V4.json", "/Multi_V4.json", "/Public_V4.json"}; for (String keyFile : keyFiles) { diff --git a/web3rpc/rpc-specs/components/schemas/common/Common.yaml b/web3rpc/rpc-specs/components/schemas/common/Common.yaml index 2d61c0dc3..17ea682ed 100644 --- a/web3rpc/rpc-specs/components/schemas/common/Common.yaml +++ b/web3rpc/rpc-specs/components/schemas/common/Common.yaml @@ -1196,11 +1196,11 @@ components: maxFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." maxPriorityFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." input: type: string format: DATA @@ -1233,7 +1233,7 @@ components: accounts: type: array items: - type: object + type: string description: The list of account addresses. EthBlockHeader: diff --git a/web3rpc/rpc-specs/components/schemas/common/KlaytnTransactionTypes.yaml b/web3rpc/rpc-specs/components/schemas/common/KlaytnTransactionTypes.yaml index 7fda99929..c3b66c1c7 100644 --- a/web3rpc/rpc-specs/components/schemas/common/KlaytnTransactionTypes.yaml +++ b/web3rpc/rpc-specs/components/schemas/common/KlaytnTransactionTypes.yaml @@ -33,7 +33,7 @@ components: required: - from - data - description: TxTypeLegacyTransaction represents a type of transaction existed previously in Klaytn. This transaction type exists to support compatibility. For more information, see TxTypeLegacyTransaction. + description: TxTypeLegacyTransaction represents a type of transaction existed previously in Kaia. This transaction type exists to support compatibility. For more information, see TxTypeLegacyTransaction. properties: from: type: string diff --git a/web3rpc/rpc-specs/paths/admin/addPeer.yaml b/web3rpc/rpc-specs/paths/admin/addPeer.yaml index ce5fc749d..b7c513698 100644 --- a/web3rpc/rpc-specs/paths/admin/addPeer.yaml +++ b/web3rpc/rpc-specs/paths/admin/addPeer.yaml @@ -17,7 +17,7 @@ paths: description: | The addPeer is an administrative method that requests adding a new remote node to the list of tracked static nodes. The node will try to maintain connectivity to these nodes at all times, reconnecting every once in a while if the remote connection goes down. - The method accepts a single argument kni, which means "Klaytn Network Identifier". It is similar to the enode concept in the geth. It is URL of the remote peer to start tracking and returns a BOOL indicating whether the peer was accepted for tracking or some error occurred. + The method accepts a single argument kni, which means "Kaia Network Identifier". It is similar to the enode concept in the geth. It is URL of the remote peer to start tracking and returns a BOOL indicating whether the peer was accepted for tracking or some error occurred. **JSONRPC:** `admin_addPeer` diff --git a/web3rpc/rpc-specs/paths/admin/datadir.yaml b/web3rpc/rpc-specs/paths/admin/datadir.yaml index 436f6d3b4..14bdee98c 100644 --- a/web3rpc/rpc-specs/paths/admin/datadir.yaml +++ b/web3rpc/rpc-specs/paths/admin/datadir.yaml @@ -15,7 +15,7 @@ paths: operationId: datadir summary: "admin_datadir" description: | - The datadir administrative property can be queried for the absolute path the running Klaytn node currently uses to store all its databases. The default path is different depending on the node types (kcn, kpn, and ken) and the OS type. + The datadir administrative property can be queried for the absolute path the running Kaia node currently uses to store all its databases. The default path is different depending on the node types (kcn, kpn, and ken) and the OS type. **JSONRPC:** `admin_datadir` diff --git a/web3rpc/rpc-specs/paths/admin/importChain.yaml b/web3rpc/rpc-specs/paths/admin/importChain.yaml index 9fad28973..b70e45948 100644 --- a/web3rpc/rpc-specs/paths/admin/importChain.yaml +++ b/web3rpc/rpc-specs/paths/admin/importChain.yaml @@ -15,7 +15,7 @@ paths: operationId: importChain summary: "admin_importChain" description: | - The importChain is an administrative method that imports an exported chain from a file into a node. This method imports only blocks that haven't existed in a Klaytn node. This method does not delete any data of the existing chain. + The importChain is an administrative method that imports an exported chain from a file into a node. This method imports only blocks that haven't existed in a Kaia node. This method does not delete any data of the existing chain. **JSONRPC:** `admin_importChain` diff --git a/web3rpc/rpc-specs/paths/admin/importChainFromString.yaml b/web3rpc/rpc-specs/paths/admin/importChainFromString.yaml index 665c292a0..d6a041a51 100644 --- a/web3rpc/rpc-specs/paths/admin/importChainFromString.yaml +++ b/web3rpc/rpc-specs/paths/admin/importChainFromString.yaml @@ -15,7 +15,7 @@ paths: operationId: importChainFromString summary: "admin_importChainFromString" description: | - The importChainFromString is an administrative method that imports a chain from a RLP-encoded string of blocks into a Klaytn node. This only works if there is no existing chain in a Klaytn node. This method does not delete any data of the existing chain. + The importChainFromString is an administrative method that imports a chain from a RLP-encoded string of blocks into a Kaia node. This only works if there is no existing chain in a Kaia node. This method does not delete any data of the existing chain. **JSONRPC:** `admin_importChainFromString` diff --git a/web3rpc/rpc-specs/paths/admin/nodeInfo.yaml b/web3rpc/rpc-specs/paths/admin/nodeInfo.yaml index 974890388..3b7dc39e6 100644 --- a/web3rpc/rpc-specs/paths/admin/nodeInfo.yaml +++ b/web3rpc/rpc-specs/paths/admin/nodeInfo.yaml @@ -15,7 +15,7 @@ paths: operationId: nodeInfo summary: "admin_nodeInfo" description: | - The nodeInfo administrative property can be queried for all the information known about the running Klaytn node at the networking granularity. These include general information about the node itself as a participant of the devp2p P2P overlay protocol, as well as specialized information added by each of the running application protocols, e.g., klay. + The nodeInfo administrative property can be queried for all the information known about the running Kaia node at the networking granularity. These include general information about the node itself as a participant of the devp2p P2P overlay protocol, as well as specialized information added by each of the running application protocols, e.g., klay. **JSONRPC:** `admin_nodeInfo` @@ -75,7 +75,7 @@ components: type: object description: The node information. example: - {"id":"377ef808aff73a397d133b3bf160df586054c98c0e6a65c8fce9560e6a0632bc975419f461803d27f28ee270287113cc2359225814debc1bfb2f811061e14c5d", "name":"Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X", "kni":"kni://377ef808aff73a397d133b3bf160df586054c98c0e6a65c8fce9560e6a0632bc975419f461803d27f28ee270287113cc2359225814debc1bfb2f811061e14c5d@[::]:32323?discport=0", + {"id":"377ef808aff73a397d133b3bf160df586054c98c0e6a65c8fce9560e6a0632bc975419f461803d27f28ee270287113cc2359225814debc1bfb2f811061e14c5d", "name":"Kaia/vvX.X.X/XXXX-XXXX/goX.X.X", "kni":"kni://377ef808aff73a397d133b3bf160df586054c98c0e6a65c8fce9560e6a0632bc975419f461803d27f28ee270287113cc2359225814debc1bfb2f811061e14c5d@[::]:32323?discport=0", "ip":"::", "ports":{"discovery":0,"listener":32323}, "listenAddr":"[::]:32323", diff --git a/web3rpc/rpc-specs/paths/admin/peers.yaml b/web3rpc/rpc-specs/paths/admin/peers.yaml index 9260a6504..9f0a2ecab 100644 --- a/web3rpc/rpc-specs/paths/admin/peers.yaml +++ b/web3rpc/rpc-specs/paths/admin/peers.yaml @@ -80,7 +80,7 @@ components: [ { "id":"144af69d2bb030c6a2a5ceee7445dc613e200f19358547cffc353d56e6c8a5b4186a6953c028b6afd0ab3c2bfc4c86f24b0bf855d0686b964ec65cefd3deec37", - "name":"Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X", + "name":"Kaia/vvX.X.X/XXXX-XXXX/goX.X.X", "caps":["istanbul/64"], "network": { @@ -102,7 +102,7 @@ components: }, { "id":"a875620f67f0b12edb97d0ec269e7940f2505b1f62576f39858c37e1d7f956318c3a619239f03f806a79ccaa8e7e9b5def343c24a9fd2e9d715964e0952dd995", - "name":"Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X", + "name":"Kaia/vvX.X.X/XXXX-XXXX/goX.X.X", "caps":["istanbul/64"], "networks": [ @@ -126,7 +126,7 @@ components: }, { "id":"e18d6d4e0ffac0a51028a8d49a548295ac8ac50d064f3581600799a3ae761a61f0b39c38b4195e163e01f30db616debf61b5b2ddea716bc8fb1c907ce7a1de26", - "name":"Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X", + "name":"Kaia/vvX.X.X/XXXX-XXXX/goX.X.X", "caps":["istanbul/64"], "network": { diff --git a/web3rpc/rpc-specs/paths/admin/removePeer.yaml b/web3rpc/rpc-specs/paths/admin/removePeer.yaml index ea4e1f2b2..f2f658c99 100644 --- a/web3rpc/rpc-specs/paths/admin/removePeer.yaml +++ b/web3rpc/rpc-specs/paths/admin/removePeer.yaml @@ -17,7 +17,7 @@ paths: description: | The removePeer is an administrative method that requests removing a node from the list of tracked static nodes. - The method accepts a single argument kni, which means "Klaytn Network Identifier". It is similar to the enode concept in the geth. It is URL of the remote peer to be removed from a list and returns a BOOL indicating whether the peer was removed or some error occurred. + The method accepts a single argument kni, which means "Kaia Network Identifier". It is similar to the enode concept in the geth. It is URL of the remote peer to be removed from a list and returns a BOOL indicating whether the peer was removed or some error occurred. **JSONRPC:** `admin_removePeer` diff --git a/web3rpc/rpc-specs/paths/admin/saveTrieNodeCacheToDisk.yaml b/web3rpc/rpc-specs/paths/admin/saveTrieNodeCacheToDisk.yaml index 6fb381e44..37385bea2 100644 --- a/web3rpc/rpc-specs/paths/admin/saveTrieNodeCacheToDisk.yaml +++ b/web3rpc/rpc-specs/paths/admin/saveTrieNodeCacheToDisk.yaml @@ -15,7 +15,7 @@ paths: operationId: saveTrieNodeCacheToDisk summary: "admin_saveTrieNodeCacheToDisk" description: | - The saveTrieNodeCacheToDisk is an administrative method that starts saving the cached trie node to the disk to reuse them when the node restarts. Cached trie node data will be stored to and loaded from $DATA_DIR/fastcache . This method returns an error if the saving process has been already triggered or trie node cache is disabled. This feature is supported since Klaytn 1.5.3. + The saveTrieNodeCacheToDisk is an administrative method that starts saving the cached trie node to the disk to reuse them when the node restarts. Cached trie node data will be stored to and loaded from $DATA_DIR/fastcache . This method returns an error if the saving process has been already triggered or trie node cache is disabled. This feature is supported since Kaia 1.5.3. **JSONRPC:** `admin_saveTrieNodeCacheToDisk` diff --git a/web3rpc/rpc-specs/paths/admin/setMaxSubscriptionPerWSConn.yaml b/web3rpc/rpc-specs/paths/admin/setMaxSubscriptionPerWSConn.yaml index 61749ae50..8c1b32898 100644 --- a/web3rpc/rpc-specs/paths/admin/setMaxSubscriptionPerWSConn.yaml +++ b/web3rpc/rpc-specs/paths/admin/setMaxSubscriptionPerWSConn.yaml @@ -15,7 +15,7 @@ paths: operationId: setMaxSubscriptionPerWSConn summary: "admin_setMaxSubscriptionPerWSConn" description: | - The setMaxSubscriptionPerWSConn is an administrative method that sets the maximum allowed number of subscriptions per single WebSocket connection. For example, if the maximum number is set to five and a user requests more than five subscriptions through the klay_subscribe API, an error message "Maximum 5 subscriptions are allowed for a WebSocket connection" will be displayed. This feature is supported since Klaytn 1.6.0. + The setMaxSubscriptionPerWSConn is an administrative method that sets the maximum allowed number of subscriptions per single WebSocket connection. For example, if the maximum number is set to five and a user requests more than five subscriptions through the klay_subscribe API, an error message "Maximum 5 subscriptions are allowed for a WebSocket connection" will be displayed. This feature is supported since Kaia 1.6.0. **JSONRPC:** `admin_setMaxSubscriptionPerWSConn` diff --git a/web3rpc/rpc-specs/paths/admin/startStateMigration.yaml b/web3rpc/rpc-specs/paths/admin/startStateMigration.yaml index afe6cc7e9..08e6ca60e 100644 --- a/web3rpc/rpc-specs/paths/admin/startStateMigration.yaml +++ b/web3rpc/rpc-specs/paths/admin/startStateMigration.yaml @@ -15,7 +15,7 @@ paths: operationId: startStateMigration summary: "admin_startStateMigration" description: | - The startStateMigration is an administrative method that starts a state migration and removes old state/storage trie nodes. This can save the storage space of a Klaytn node. The method returns an error if it fails to start a state migration, or null if it succeeds to start. NOTE: After the state migration, the node cannot serve APIs with previous states. + The startStateMigration is an administrative method that starts a state migration and removes old state/storage trie nodes. This can save the storage space of a Kaia node. The method returns an error if it fails to start a state migration, or null if it succeeds to start. NOTE: After the state migration, the node cannot serve APIs with previous states. **JSONRPC:** `admin_startStateMigration` diff --git a/web3rpc/rpc-specs/paths/debug/blockchainInspection/getBlockRlp.yaml b/web3rpc/rpc-specs/paths/debug/blockchainInspection/getBlockRlp.yaml index 355e2634a..7cd89cd16 100644 --- a/web3rpc/rpc-specs/paths/debug/blockchainInspection/getBlockRlp.yaml +++ b/web3rpc/rpc-specs/paths/debug/blockchainInspection/getBlockRlp.yaml @@ -17,7 +17,7 @@ paths: description: | Retrieves and returns the RLP-encoded block by the block number. - **NOTE**: In versions earlier than Klaytn v1.7.0, only integer type is available. + **NOTE**: In versions earlier than Kaia v1.7.0, only integer type is available. **JSONRPC:** `debug_getBlockRlp` diff --git a/web3rpc/rpc-specs/paths/debug/blockchainInspection/printBlock.yaml b/web3rpc/rpc-specs/paths/debug/blockchainInspection/printBlock.yaml index 82ccf9107..c9a936c1c 100644 --- a/web3rpc/rpc-specs/paths/debug/blockchainInspection/printBlock.yaml +++ b/web3rpc/rpc-specs/paths/debug/blockchainInspection/printBlock.yaml @@ -17,7 +17,7 @@ paths: description: | Retrieves a block and returns its pretty printed form. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer type is available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer type is available.* **JSONRPC:** `debug_printBlock` tags: diff --git a/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockHashAndIndex.yaml b/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockHashAndIndex.yaml index b19a3e76d..a7495c95f 100644 --- a/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockHashAndIndex.yaml +++ b/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockHashAndIndex.yaml @@ -17,7 +17,7 @@ paths: - eth operationId: getUncleByBlockHashAndIndex description: | - Returns information about a uncle of a block by hash and the uncle's index position. Since there are no uncles in Klaytn, it always returns null. + Returns information about a uncle of a block by hash and the uncle's index position. Since there are no uncles in Kaia, it always returns null. **JSONRPC:** `eth_getUncleByBlockHashAndIndex` diff --git a/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockNumberAndIndex.yaml b/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockNumberAndIndex.yaml index 8d75c272b..e1991cfc8 100644 --- a/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockNumberAndIndex.yaml +++ b/web3rpc/rpc-specs/paths/eth/block/getUncleByBlockNumberAndIndex.yaml @@ -17,7 +17,7 @@ paths: - eth operationId: getUncleByBlockNumberAndIndex description: | - Returns information about a uncle of a block by number and the uncle's index position. As there are no uncles in Klaytn, it always returns null. + Returns information about a uncle of a block by number and the uncle's index position. As there are no uncles in Kaia, it always returns null. **JSONRPC:** `eth_getUncleByBlockNumberAndIndex` diff --git a/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockHash.yaml b/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockHash.yaml index a1dd658a3..449553e56 100644 --- a/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockHash.yaml +++ b/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockHash.yaml @@ -17,7 +17,7 @@ paths: - eth operationId: getUncleCountByBlockHash description: | - Returns the number of uncles in a block from a block matching the given block hash. Since there are no uncles in Klaytn, it returns 0x0. It returns null if there is no matching block. + Returns the number of uncles in a block from a block matching the given block hash. Since there are no uncles in Kaia, it returns 0x0. It returns null if there is no matching block. **JSONRPC:** `eth_getUncleCountByBlockHash` diff --git a/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockNumber.yaml b/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockNumber.yaml index 32ff6101f..c853ecbe1 100644 --- a/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockNumber.yaml +++ b/web3rpc/rpc-specs/paths/eth/block/getUncleCountByBlockNumber.yaml @@ -17,7 +17,7 @@ paths: - eth operationId: getUncleCountByBlockNumber description: | - Returns the number of uncles in a block from a block matching the given block number. Since there are no uncles in Klaytn, it returns 0x0. It returns null if there is no matching block. + Returns the number of uncles in a block from a block matching the given block number. Since there are no uncles in Kaia, it returns 0x0. It returns null if there is no matching block. **JSONRPC:** `eth_getUncleCountByBlockNumber` diff --git a/web3rpc/rpc-specs/paths/eth/filter/getFilterLogs.yaml b/web3rpc/rpc-specs/paths/eth/filter/getFilterLogs.yaml index e8422f114..6db744263 100644 --- a/web3rpc/rpc-specs/paths/eth/filter/getFilterLogs.yaml +++ b/web3rpc/rpc-specs/paths/eth/filter/getFilterLogs.yaml @@ -19,7 +19,7 @@ paths: description: | Returns an array of all logs matching filter with given id, which has been obtained using eth_newFilter. Note that filter ids returned by other filter creation functions, such as eth_newBlockFilter or eth_newPendingTransactionFilter , cannot be used with this function. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. - The number of maximum returned results in a single query (Default: 10,000). diff --git a/web3rpc/rpc-specs/paths/eth/filter/getLogs.yaml b/web3rpc/rpc-specs/paths/eth/filter/getLogs.yaml index dfa2cfc33..e26257c22 100644 --- a/web3rpc/rpc-specs/paths/eth/filter/getLogs.yaml +++ b/web3rpc/rpc-specs/paths/eth/filter/getLogs.yaml @@ -17,7 +17,7 @@ paths: description: | Returns an array of all logs matching a given filter object. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. - The number of maximum returned results in a single query (Default: 10,000). diff --git a/web3rpc/rpc-specs/paths/eth/filter/newFilter.yaml b/web3rpc/rpc-specs/paths/eth/filter/newFilter.yaml index c8bd62000..e0d480313 100644 --- a/web3rpc/rpc-specs/paths/eth/filter/newFilter.yaml +++ b/web3rpc/rpc-specs/paths/eth/filter/newFilter.yaml @@ -26,7 +26,7 @@ paths: - [A, B] "A in first position AND B in second position (and anything after)" - [[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)" - **NOTE**: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE**: In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `eth_newFilter` @@ -105,7 +105,8 @@ components: Topics: type: array - description: (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. + description: | + (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. items: type: string format: 32-byte DATA diff --git a/web3rpc/rpc-specs/paths/eth/gas/maxPriorityFeePerGas.yaml b/web3rpc/rpc-specs/paths/eth/gas/maxPriorityFeePerGas.yaml index 045315f4a..8eaea42bc 100644 --- a/web3rpc/rpc-specs/paths/eth/gas/maxPriorityFeePerGas.yaml +++ b/web3rpc/rpc-specs/paths/eth/gas/maxPriorityFeePerGas.yaml @@ -23,7 +23,7 @@ paths: - After Magma, returns zero - After Kaia, returns zero if network is uncongested (i.e. next baseFee at its lower bound), otherwise 60% percentile effective tip from previous 20 blocks (under default setting) - **NOTE:** This API has different behavior from Ethereum's and returns a gas price of Klaytn instead of suggesting a gas price as in Ethereum. + **NOTE:** This API has different behavior from Ethereum's and returns a gas price of Kaia instead of suggesting a gas price as in Ethereum. **JSONRPC:** `eth_maxPriorityFeePerGas` diff --git a/web3rpc/rpc-specs/paths/eth/miscellaneous/getHashrate.yaml b/web3rpc/rpc-specs/paths/eth/miscellaneous/getHashrate.yaml index d5fcf8bb0..0863b84f0 100644 --- a/web3rpc/rpc-specs/paths/eth/miscellaneous/getHashrate.yaml +++ b/web3rpc/rpc-specs/paths/eth/miscellaneous/getHashrate.yaml @@ -18,7 +18,7 @@ paths: operationId: getHashrate description: | Returns the number of hashes per second that the node is mining with. - Please note that it always return 0x0 because there is no PoW mechanism in Klaytn. + Please note that it always return 0x0 because there is no PoW mechanism in Kaia. **JSONRPC:** `eth_getHashrate` diff --git a/web3rpc/rpc-specs/paths/eth/miscellaneous/getWork.yaml b/web3rpc/rpc-specs/paths/eth/miscellaneous/getWork.yaml index a98ae57b4..0478d2c0b 100644 --- a/web3rpc/rpc-specs/paths/eth/miscellaneous/getWork.yaml +++ b/web3rpc/rpc-specs/paths/eth/miscellaneous/getWork.yaml @@ -19,7 +19,7 @@ paths: description: | Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target"). - Please note that it always return `errNoMiningWork` because there is no PoW mechanism in Klaytn. + Please note that it always return `errNoMiningWork` because there is no PoW mechanism in Kaia. **JSONRPC:** `eth_getWork` diff --git a/web3rpc/rpc-specs/paths/eth/miscellaneous/hashrate.yaml b/web3rpc/rpc-specs/paths/eth/miscellaneous/hashrate.yaml index 64d9a8b6e..0dfb9c5d0 100644 --- a/web3rpc/rpc-specs/paths/eth/miscellaneous/hashrate.yaml +++ b/web3rpc/rpc-specs/paths/eth/miscellaneous/hashrate.yaml @@ -18,7 +18,7 @@ paths: operationId: hashrate description: | Returns the number of hashes per second that the node is mining with. - Please note that it always return 0x0 because there is no PoW mechanism in Klaytn. + Please note that it always return 0x0 because there is no PoW mechanism in Kaia. **JSONRPC:** `eth_hashrate` diff --git a/web3rpc/rpc-specs/paths/eth/miscellaneous/submitHashrate.yaml b/web3rpc/rpc-specs/paths/eth/miscellaneous/submitHashrate.yaml index b1071db72..3b049e8a6 100644 --- a/web3rpc/rpc-specs/paths/eth/miscellaneous/submitHashrate.yaml +++ b/web3rpc/rpc-specs/paths/eth/miscellaneous/submitHashrate.yaml @@ -19,7 +19,7 @@ paths: description: | Used for submitting mining hashrate. - Please note that it always return false because there is no PoW mechanism in Klaytn. + Please note that it always return false because there is no PoW mechanism in Kaia. **JSONRPC:** `eth_submitHashrate` diff --git a/web3rpc/rpc-specs/paths/eth/miscellaneous/submitWork.yaml b/web3rpc/rpc-specs/paths/eth/miscellaneous/submitWork.yaml index 9803cc9e2..215d53ec1 100644 --- a/web3rpc/rpc-specs/paths/eth/miscellaneous/submitWork.yaml +++ b/web3rpc/rpc-specs/paths/eth/miscellaneous/submitWork.yaml @@ -19,7 +19,7 @@ paths: description: | Used for submitting a proof-of-work solution. - Please note that it always return false because there is no PoW mechanism in Klaytn. + Please note that it always return false because there is no PoW mechanism in Kaia. **JSONRPC:** `eth_submitWork` diff --git a/web3rpc/rpc-specs/paths/eth/transaction/fillTransaction.yaml b/web3rpc/rpc-specs/paths/eth/transaction/fillTransaction.yaml index e6e23323e..ef6c80f85 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/fillTransaction.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/fillTransaction.yaml @@ -223,11 +223,11 @@ components: maxFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." maxPriorityFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." input: type: string format: DATA diff --git a/web3rpc/rpc-specs/paths/eth/transaction/sendTransaction.yaml b/web3rpc/rpc-specs/paths/eth/transaction/sendTransaction.yaml index 4b6d50d72..395873eb7 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/sendTransaction.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/sendTransaction.yaml @@ -17,7 +17,7 @@ paths: - eth operationId: sendTransaction description: | - Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Klaytn network. + Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Kaia network. `eth_sendTransaction` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `eth_sendTransaction`. @@ -119,11 +119,11 @@ components: maxFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." maxPriorityFeePerGas: type: string format: hex - description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." + description: "(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum)." input: type: string format: DATA diff --git a/web3rpc/rpc-specs/paths/eth/transaction/signTransaction.yaml b/web3rpc/rpc-specs/paths/eth/transaction/signTransaction.yaml index e3ed74698..d309dd161 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/signTransaction.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/signTransaction.yaml @@ -50,11 +50,11 @@ paths: maxFeePerGas: type: string format: hex - description: The maximum amount to pay for the transaction's execution. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). + description: The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). maxPriorityFeePerGas: type: string format: hex - description: Gas tip cap for dynamic fee transaction in peb. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). + description: Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). input: type: string format: DATA @@ -141,11 +141,11 @@ components: maxFeePerGas: type: string format: hex - description: The maximum amount to pay for the transaction's execution. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). + description: The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). maxPriorityFeePerGas: type: string format: hex - description: Gas tip cap for dynamic fee transaction in peb. Since Klaytn uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). + description: Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum). input: type: string format: DATA diff --git a/web3rpc/rpc-specs/paths/governance/chainConfig.yaml b/web3rpc/rpc-specs/paths/governance/chainConfig.yaml index 14d7886a3..4cb72c12c 100644 --- a/web3rpc/rpc-specs/paths/governance/chainConfig.yaml +++ b/web3rpc/rpc-specs/paths/governance/chainConfig.yaml @@ -17,7 +17,7 @@ paths: description: | The chainConfig property provides the latest chain configuration. This is equivalent to chainConfigAt() with an empty parameter. - **NOTE:** In versions earlier than Klaytn v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Klaytn v1.10.0. To query the initial chain configuration, use chainConfigAt(0) instead. + **NOTE:** In versions earlier than Kaia v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Kaia v1.10.0. To query the initial chain configuration, use chainConfigAt(0) instead. **JSONRPC:** `governance_chainConfig` diff --git a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml index 72ea64532..dbe94894b 100644 --- a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml @@ -17,7 +17,7 @@ paths: description: | The getChainConfig property provides the latest chain configuration. This is equivalent to chainConfigAt() with an empty parameter. - **NOTE:** In versions earlier than Klaytn v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Klaytn v1.10.0. To query the initial chain configuration, use getChainConfigAt(0) instead. + **NOTE:** In versions earlier than Kaia v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Kaia v1.10.0. To query the initial chain configuration, use getChainConfigAt(0) instead. **JSONRPC:** `governance_getChainConfig` diff --git a/web3rpc/rpc-specs/paths/governance/getParams.yaml b/web3rpc/rpc-specs/paths/governance/getParams.yaml index b3b4b1ddc..2c1ccd0c2 100644 --- a/web3rpc/rpc-specs/paths/governance/getParams.yaml +++ b/web3rpc/rpc-specs/paths/governance/getParams.yaml @@ -17,9 +17,9 @@ paths: description: | The getParams returns governance items at specific block. - **WARNING:** governance_getParams API will be deprecated since Klaytn v1.11 (see klaytn#1783). Use governance_getParams instead. + **WARNING:** governance_getParams API will be deprecated since Kaia v1.11 (see klaytn#1783). Use governance_getParams instead. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **NOTE:** The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future governance parameters are subject to change via additional governance votes or GovParam contract state changes. diff --git a/web3rpc/rpc-specs/paths/governance/itemsAt.yaml b/web3rpc/rpc-specs/paths/governance/itemsAt.yaml index 24265578d..7604c6c30 100644 --- a/web3rpc/rpc-specs/paths/governance/itemsAt.yaml +++ b/web3rpc/rpc-specs/paths/governance/itemsAt.yaml @@ -17,9 +17,9 @@ paths: description: | The itemsAt returns governance items at specific block. - **WARNING:** governance_itemsAt API will be deprecated since Klaytn v1.11 (see klaytn#1783). Use governance_getParams instead. + **WARNING:** governance_itemsAt API will be deprecated since Kaia v1.11 (see klaytn#1783). Use governance_getParams instead. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **NOTE:** The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future governance parameters are subject to change via additional governance votes or GovParam contract state changes. diff --git a/web3rpc/rpc-specs/paths/kaia/account/accountCreated.yaml b/web3rpc/rpc-specs/paths/kaia/account/accountCreated.yaml index 2ca1b35f9..21ac7061d 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/accountCreated.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/accountCreated.yaml @@ -17,7 +17,7 @@ paths: description: | Returns `true` if the account associated with the address is created. It returns `false` otherwise. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_accountCreated` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/getAccount.yaml b/web3rpc/rpc-specs/paths/kaia/account/getAccount.yaml index f553a17fe..2283b1715 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/getAccount.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/getAccount.yaml @@ -15,9 +15,9 @@ paths: operationId: .getAccount summary: "[Account] kaia_getAccount" description: | - Returns the account information of a given address. There are two different account types in Klaytn: Externally Owned Account (EOA) and Smart Contract Account. See Klaytn Accounts. + Returns the account information of a given address. There are two different account types in Kaia: Externally Owned Account (EOA) and Smart Contract Account. See Kaia Accounts. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` **JSONRPC:** `kaia_getAccount` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/getAccountKey.yaml b/web3rpc/rpc-specs/paths/kaia/account/getAccountKey.yaml index 8e2147bd6..d634016e2 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/getAccountKey.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/getAccountKey.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the account key of the Externally Owned Account (EOA) of a given address. If the account has AccountKeyLegacy or the account of the given address is a Smart Contract Account, it will return an empty key value. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `kaia_getAccountKey` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/getBalance.yaml b/web3rpc/rpc-specs/paths/kaia/account/getBalance.yaml index 9ff486b00..0b2c803ae 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/getBalance.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/getBalance.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the balance of the account of given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` **JSONRPC:** `kaia_getBalance` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/getCode.yaml b/web3rpc/rpc-specs/paths/kaia/account/getCode.yaml index 579ad983d..a39ca63a0 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/getCode.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/getCode.yaml @@ -17,7 +17,7 @@ paths: description: | Returns code at a given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getCode` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/getTransactionCount.yaml b/web3rpc/rpc-specs/paths/kaia/account/getTransactionCount.yaml index 63689b57b..a0f56b6ef 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/getTransactionCount.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/getTransactionCount.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the number of transactions sent from an address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `kaia_getTransactionCount` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/account/isContractAccount.yaml b/web3rpc/rpc-specs/paths/kaia/account/isContractAccount.yaml index 602bbe892..4a8ff9824 100644 --- a/web3rpc/rpc-specs/paths/kaia/account/isContractAccount.yaml +++ b/web3rpc/rpc-specs/paths/kaia/account/isContractAccount.yaml @@ -17,7 +17,7 @@ paths: description: | Returns true if an input account has a non-empty codeHash at the time of a specific block number. It returns false if the account is an EOA or a smart contract account which doesn't have codeHash. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `kaia_isContractAccount` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getBlockByNumber.yaml b/web3rpc/rpc-specs/paths/kaia/block/getBlockByNumber.yaml index ad3517a53..fcbd9ea44 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getBlockByNumber.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getBlockByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a block by block number. This API works only on RPC call, not on JavaScript console. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getBlockByNumber` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getBlockTransactionCountByNumber.yaml b/web3rpc/rpc-specs/paths/kaia/block/getBlockTransactionCountByNumber.yaml index c1f3386e7..f6a1b3296 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getBlockTransactionCountByNumber.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getBlockTransactionCountByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the number of transactions in a block matching the given block number. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `kaia_getBlockTransactionCountByNumber` diff --git a/web3rpc/rpc-specs/paths/kaia/block/getBlockWithConsensusInfoByNumber.yaml b/web3rpc/rpc-specs/paths/kaia/block/getBlockWithConsensusInfoByNumber.yaml index ff111d975..7f0cf60fc 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getBlockWithConsensusInfoByNumber.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getBlockWithConsensusInfoByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns a block with consensus information that matches the given block number. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `kaia_getBlockWithConsensusInfoByNumber` diff --git a/web3rpc/rpc-specs/paths/kaia/block/getCommittee.yaml b/web3rpc/rpc-specs/paths/kaia/block/getCommittee.yaml index 69e27bd5b..c9cc1e959 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getCommittee.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getCommittee.yaml @@ -17,7 +17,7 @@ paths: description: | Returns a list of all validators in the committee at the specified block. If the parameter is not set, returns a list of all validators in the committee at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getCommittee` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getCommitteeSize.yaml b/web3rpc/rpc-specs/paths/kaia/block/getCommitteeSize.yaml index c580bb6f3..0b2e8eec1 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getCommitteeSize.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getCommitteeSize.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the size of the committee at the specified block. If the parameter is not set, returns the size of the committee at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getCommitteeSize` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getCouncil.yaml b/web3rpc/rpc-specs/paths/kaia/block/getCouncil.yaml index 0e3790c2d..5f96a65c1 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getCouncil.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getCouncil.yaml @@ -21,7 +21,7 @@ paths: *kaia_getValidators is replaced with this method and is not supported anymore.* - *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getCouncil` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getCouncilSize.yaml b/web3rpc/rpc-specs/paths/kaia/block/getCouncilSize.yaml index e14fa1dde..fd19f0fc7 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getCouncilSize.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getCouncilSize.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the size of the council at the specified block. If the parameter is not set, returns the size of the council at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getCouncilSize` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getHeaderByHash.yaml b/web3rpc/rpc-specs/paths/kaia/block/getHeaderByHash.yaml index 0d9360e72..ac2a5115f 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getHeaderByHash.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getHeaderByHash.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a header by hash. This API works only on RPC call, not on JavaScript console. - **NOTE:** *This API is supported from Klaytn v1.7.0.* + **NOTE:** *This API is supported from Kaia v1.7.0.* **JSONRPC:** `kaia_getHeaderByHash` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getHeaderByNumber.yaml b/web3rpc/rpc-specs/paths/kaia/block/getHeaderByNumber.yaml index 1c06b7ecd..493f3c655 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getHeaderByNumber.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getHeaderByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a header by number. This API works only on RPC call, not on JavaScript console. - **NOTE:** *This API is supported from Klaytn v1.7.0.* + **NOTE:** *This API is supported from Kaia v1.7.0.* **JSONRPC:** `kaia_getHeaderByNumber` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/block/getStorageAt.yaml b/web3rpc/rpc-specs/paths/kaia/block/getStorageAt.yaml index a3d56ca66..2ed5ef0b9 100644 --- a/web3rpc/rpc-specs/paths/kaia/block/getStorageAt.yaml +++ b/web3rpc/rpc-specs/paths/kaia/block/getStorageAt.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the value from a storage position at a given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getStorageAt` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/clientVersion.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/clientVersion.yaml index a118766db..5fafb5203 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/clientVersion.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/clientVersion.yaml @@ -15,7 +15,7 @@ paths: operationId: .clientVersion summary: "[Configuration] kaia_clientVersion" description: | - Returns the current client version of a Klaytn node. + Returns the current client version of a Kaia node. **JSONRPC:** `kaia_clientVersion` tags: @@ -35,7 +35,7 @@ paths: responses: 200: - description: The current client version of a Klaytn node. + description: The current client version of a Kaia node. content: application/json: schema: @@ -45,8 +45,8 @@ paths: properties: result: type: string - description: "The current client version of a Klaytn node." - example: "Klaytn/v0.9.1+3518232250/linux-amd64/go1.11.2" + description: "The current client version of a Kaia node." + example: "Kaia/v0.9.1+3518232250/linux-amd64/go1.11.2" x-codeSamples: - lang: "Shell" diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/protocolVersion.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/protocolVersion.yaml index 4c777a7b2..84d32f208 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/protocolVersion.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/protocolVersion.yaml @@ -15,7 +15,7 @@ paths: operationId: .protocolVersion summary: "[Configuration] kaia_protocolVersion" description: | - Returns the Klaytn protocol version of the node. The current version (as of v1.9.0) of Cypress/Baobab is istanbul/65. + Returns the Kaia protocol version of the node. The current version (as of v1.9.0) of Cypress/Baobab is istanbul/65. **JSONRPC:** `kaia_protocolVersion` tags: @@ -35,7 +35,7 @@ paths: responses: 200: - description: Returns the Klaytn protocol version of the node. + description: Returns the Kaia protocol version of the node. content: application/json: schema: @@ -46,7 +46,7 @@ paths: result: type: string format: hex - description: "The Klaytn protocol version of the node." + description: "The Kaia protocol version of the node." example: "0xAE9F7BCC00" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/kaia/filter/getFilterLogs.yaml b/web3rpc/rpc-specs/paths/kaia/filter/getFilterLogs.yaml index 91f47ab37..fdecaee0e 100644 --- a/web3rpc/rpc-specs/paths/kaia/filter/getFilterLogs.yaml +++ b/web3rpc/rpc-specs/paths/kaia/filter/getFilterLogs.yaml @@ -17,7 +17,7 @@ paths: description: | Returns an array of all logs matching filter with given id, which has been obtained using kaia_newFilter.Note that filter ids returned by other filter creation functions, such as kaia_newBlockFilter or kaia_newPendingTransactionFilter, cannot be used with this function. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. - The number of maximum returned results in a single query (Default: 10,000). diff --git a/web3rpc/rpc-specs/paths/kaia/filter/getLogs.yaml b/web3rpc/rpc-specs/paths/kaia/filter/getLogs.yaml index 19094fe72..996be30b9 100644 --- a/web3rpc/rpc-specs/paths/kaia/filter/getLogs.yaml +++ b/web3rpc/rpc-specs/paths/kaia/filter/getLogs.yaml @@ -17,13 +17,13 @@ paths: description: | Returns an array of all logs matching a given filter object. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. -The number of maximum returned results in a single query (Default: 10,000). -The execution duration limit of a single query (Default: 10 seconds). - **NOTE**: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE**: In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `kaia_getLogs` diff --git a/web3rpc/rpc-specs/paths/kaia/filter/newFilter.yaml b/web3rpc/rpc-specs/paths/kaia/filter/newFilter.yaml index 55aadef73..2d440481c 100644 --- a/web3rpc/rpc-specs/paths/kaia/filter/newFilter.yaml +++ b/web3rpc/rpc-specs/paths/kaia/filter/newFilter.yaml @@ -26,7 +26,7 @@ paths: - [A, B] "A in first position AND B in second position (and anything after)" - [[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)" - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `kaia_newFilter` @@ -105,7 +105,8 @@ components: Topics: type: array - description: (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. + description: | + (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. items: type: string format: 32-byte DATA diff --git a/web3rpc/rpc-specs/paths/kaia/gas/feeHistory.yaml b/web3rpc/rpc-specs/paths/kaia/gas/feeHistory.yaml index 442c7185e..e67af0f25 100644 --- a/web3rpc/rpc-specs/paths/kaia/gas/feeHistory.yaml +++ b/web3rpc/rpc-specs/paths/kaia/gas/feeHistory.yaml @@ -17,7 +17,7 @@ paths: description: | Returns base fee per gas and transaction effective priority fee per gas history for the requested block range if available. - **NOTE:** This API is effective after Klaytn v1.8.0 + **NOTE:** This API is effective after Kaia v1.8.0 **JSONRPC:** `kaia_feeHistory` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/gas/maxPriorityFeePerGas.yaml b/web3rpc/rpc-specs/paths/kaia/gas/maxPriorityFeePerGas.yaml index 535d0ce51..f3c848fbe 100644 --- a/web3rpc/rpc-specs/paths/kaia/gas/maxPriorityFeePerGas.yaml +++ b/web3rpc/rpc-specs/paths/kaia/gas/maxPriorityFeePerGas.yaml @@ -21,7 +21,7 @@ paths: - After Magma, returns zero - After Kaia, returns zero if network is uncongested (i.e. next baseFee at its lower bound), otherwise 60% percentile effective tip from previous 20 blocks (under default setting) - **NOTE:** This API is effective after Klaytn v1.8.0 + **NOTE:** This API is effective after Kaia v1.8.0 **JSONRPC:** `kaia_maxPriorityFeePerGas` diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/call.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/call.yaml index 43eda7c14..4200c3a81 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/call.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/call.yaml @@ -21,7 +21,7 @@ paths: If you deployed a contract, use kaia_getTransactionReceipt to get the contract address. - **NOTE** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `kaia_call` diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/estimateComputationCost.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/estimateComputationCost.yaml index f133b132b..11622fdc9 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/estimateComputationCost.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/estimateComputationCost.yaml @@ -17,7 +17,7 @@ paths: tags: - kaia description: | - Generates and returns an estimate of how much computation cost will be spent to execute the transaction. Klaytn limits the computation cost of a transaction to 100000000 currently not to take too much time by a single transaction. The transaction will not be added to the blockchain like kaia_estimateGas + Generates and returns an estimate of how much computation cost will be spent to execute the transaction. Kaia limits the computation cost of a transaction to 100000000 currently not to take too much time by a single transaction. The transaction will not be added to the blockchain like kaia_estimateGas **JSONRPC:** `kaia_estimateComputationCost` diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml index 3524933b3..b9a27fbb3 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml @@ -17,7 +17,7 @@ paths: tags: - kaia description: | - Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including Klaytn Virtual Machine mechanics and node performance. + Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including Kaia Virtual Machine mechanics and node performance. **JSONRPC:** `kaia_estimateGas` diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/getTransactionByBlockNumberAndIndex.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/getTransactionByBlockNumberAndIndex.yaml index 362a3768f..cc5ab9f4d 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/getTransactionByBlockNumberAndIndex.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/getTransactionByBlockNumberAndIndex.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a transaction by block number and transaction index position. This API works only on RPC call, not on JavaScript console. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `kaia_getTransactionByBlockNumberAndIndex` tags: diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/sendTransaction.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/sendTransaction.yaml index 21f5602de..f51bf4c4c 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/sendTransaction.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/sendTransaction.yaml @@ -15,7 +15,7 @@ paths: operationId: .sendTransaction summary: "[Transaction] kaia_sendTransaction" description: | - Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Klaytn network. + Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Kaia network. `kaia_sendTransaction` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `kaia_sendTransaction`. diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/sendTransactionAsFeePayer.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/sendTransactionAsFeePayer.yaml index b7998b015..6749031f3 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/sendTransactionAsFeePayer.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/sendTransactionAsFeePayer.yaml @@ -15,7 +15,7 @@ paths: operationId: .sendTransactionAsFeePayer summary: "[Transaction] kaia_sendTransactionAsFeePayer" description: | - Constructs a transaction with given parameters, signs the transaction with a fee payer's private key and propagates the transaction to Klaytn network. This API supports only fee delegated type (including partial fee delegated type) transactions. + Constructs a transaction with given parameters, signs the transaction with a fee payer's private key and propagates the transaction to Kaia network. This API supports only fee delegated type (including partial fee delegated type) transactions. `kaia_sendTransactionAsFeePayer` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `kaia_sendTransactionAsFeePayer`. diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/signTransaction.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/signTransaction.yaml index 6cf063594..08c40acf6 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/signTransaction.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/signTransaction.yaml @@ -15,7 +15,7 @@ paths: operationId: .signTransaction summary: "[Transaction] kaia_signTransaction" description: | - Constructs a transaction with given parameters and signs the transaction with a sender's private key. This method can be used either to generate a sender signature or to make a final raw transaction that is ready to submit to Klaytn network. + Constructs a transaction with given parameters and signs the transaction with a sender's private key. This method can be used either to generate a sender signature or to make a final raw transaction that is ready to submit to Kaia network. `kaia_signTransaction` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `kaia_signTransaction`. diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/signTransactionAsFeePayer.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/signTransactionAsFeePayer.yaml index c46be2d98..a73dd2fc4 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/signTransactionAsFeePayer.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/signTransactionAsFeePayer.yaml @@ -15,7 +15,7 @@ paths: operationId: .signTransactionAsFeePayer summary: "[Transaction] kaia_signTransactionAsFeePayer" description: | - Constructs a transaction with given parameters and signs the transaction with a fee payer's private key. This method can be used either to generate a fee payer signature or to make a final raw transaction that is ready to submit to Klaytn network. In case you just want to extract the fee-payer signature, simply take the feePayerSignatures from the result. Note that the raw transaction is not final if the sender's signature is not attached (that is, signatures in tx is empty). + Constructs a transaction with given parameters and signs the transaction with a fee payer's private key. This method can be used either to generate a fee payer signature or to make a final raw transaction that is ready to submit to Kaia network. In case you just want to extract the fee-payer signature, simply take the feePayerSignatures from the result. Note that the raw transaction is not final if the sender's signature is not attached (that is, signatures in tx is empty). **JSONRPC:** `kaia_signTransactionAsFeePayer` diff --git a/web3rpc/rpc-specs/paths/klay/account/accountCreated.yaml b/web3rpc/rpc-specs/paths/klay/account/accountCreated.yaml index 536bb0f2f..3723f1e02 100644 --- a/web3rpc/rpc-specs/paths/klay/account/accountCreated.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/accountCreated.yaml @@ -17,7 +17,7 @@ paths: description: | Returns `true` if the account associated with the address is created. It returns `false` otherwise. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_accountCreated` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/getAccount.yaml b/web3rpc/rpc-specs/paths/klay/account/getAccount.yaml index e7504a1e1..2e8e81919 100644 --- a/web3rpc/rpc-specs/paths/klay/account/getAccount.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/getAccount.yaml @@ -15,9 +15,9 @@ paths: operationId: getAccount summary: "[Account] klay_getAccount" description: | - Returns the account information of a given address. There are two different account types in Klaytn: Externally Owned Account (EOA) and Smart Contract Account. See Klaytn Accounts. + Returns the account information of a given address. There are two different account types in Kaia: Externally Owned Account (EOA) and Smart Contract Account. See Kaia Accounts. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` **JSONRPC:** `klay_getAccount` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/getAccountKey.yaml b/web3rpc/rpc-specs/paths/klay/account/getAccountKey.yaml index 79e534e58..ff9d898dd 100644 --- a/web3rpc/rpc-specs/paths/klay/account/getAccountKey.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/getAccountKey.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the account key of the Externally Owned Account (EOA) of a given address. If the account has AccountKeyLegacy or the account of the given address is a Smart Contract Account, it will return an empty key value. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `klay_getAccountKey` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/getBalance.yaml b/web3rpc/rpc-specs/paths/klay/account/getBalance.yaml index 0fd01a2ec..e46227246 100644 --- a/web3rpc/rpc-specs/paths/klay/account/getBalance.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/getBalance.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the balance of the account of given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.*` **JSONRPC:** `klay_getBalance` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/getCode.yaml b/web3rpc/rpc-specs/paths/klay/account/getCode.yaml index d5d64cbd0..45dae622c 100644 --- a/web3rpc/rpc-specs/paths/klay/account/getCode.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/getCode.yaml @@ -17,7 +17,7 @@ paths: description: | Returns code at a given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getCode` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/getTransactionCount.yaml b/web3rpc/rpc-specs/paths/klay/account/getTransactionCount.yaml index a0781ed7a..6b102ff97 100644 --- a/web3rpc/rpc-specs/paths/klay/account/getTransactionCount.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/getTransactionCount.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the number of transactions sent from an address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `klay_getTransactionCount` tags: diff --git a/web3rpc/rpc-specs/paths/klay/account/isContractAccount.yaml b/web3rpc/rpc-specs/paths/klay/account/isContractAccount.yaml index 6aa8859bd..fa3f51d85 100644 --- a/web3rpc/rpc-specs/paths/klay/account/isContractAccount.yaml +++ b/web3rpc/rpc-specs/paths/klay/account/isContractAccount.yaml @@ -17,7 +17,7 @@ paths: description: | Returns true if an input account has a non-empty codeHash at the time of a specific block number. It returns false if the account is an EOA or a smart contract account which doesn't have codeHash. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available* **JSONRPC:** `klay_isContractAccount` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getBlockByNumber.yaml b/web3rpc/rpc-specs/paths/klay/block/getBlockByNumber.yaml index 9114de1fd..dc6f3262c 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getBlockByNumber.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getBlockByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a block by block number. This API works only on RPC call, not on JavaScript console. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getBlockByNumber` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getBlockTransactionCountByNumber.yaml b/web3rpc/rpc-specs/paths/klay/block/getBlockTransactionCountByNumber.yaml index f6e41987f..3c1e5b456 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getBlockTransactionCountByNumber.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getBlockTransactionCountByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the number of transactions in a block matching the given block number. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `klay_getBlockTransactionCountByNumber` diff --git a/web3rpc/rpc-specs/paths/klay/block/getBlockWithConsensusInfoByNumber.yaml b/web3rpc/rpc-specs/paths/klay/block/getBlockWithConsensusInfoByNumber.yaml index 8da656a52..730edc1d5 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getBlockWithConsensusInfoByNumber.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getBlockWithConsensusInfoByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns a block with consensus information that matches the given block number. - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `klay_getBlockWithConsensusInfoByNumber` diff --git a/web3rpc/rpc-specs/paths/klay/block/getCommittee.yaml b/web3rpc/rpc-specs/paths/klay/block/getCommittee.yaml index 701bc765d..783189a73 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getCommittee.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getCommittee.yaml @@ -17,7 +17,7 @@ paths: description: | Returns a list of all validators in the committee at the specified block. If the parameter is not set, returns a list of all validators in the committee at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getCommittee` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getCommitteeSize.yaml b/web3rpc/rpc-specs/paths/klay/block/getCommitteeSize.yaml index 6dc7fb802..627bc39aa 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getCommitteeSize.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getCommitteeSize.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the size of the committee at the specified block. If the parameter is not set, returns the size of the committee at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getCommitteeSize` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getCouncil.yaml b/web3rpc/rpc-specs/paths/klay/block/getCouncil.yaml index 194d0c0d8..87cd8f861 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getCouncil.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getCouncil.yaml @@ -21,7 +21,7 @@ paths: *klay_getValidators is replaced with this method and is not supported anymore.* - *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getCouncil` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getCouncilSize.yaml b/web3rpc/rpc-specs/paths/klay/block/getCouncilSize.yaml index 7c8a7637f..f0d5ee496 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getCouncilSize.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getCouncilSize.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the size of the council at the specified block. If the parameter is not set, returns the size of the council at the latest block. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getCouncilSize` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getHeaderByHash.yaml b/web3rpc/rpc-specs/paths/klay/block/getHeaderByHash.yaml index 44663ec24..b135c303a 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getHeaderByHash.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getHeaderByHash.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a header by hash. This API works only on RPC call, not on JavaScript console. - **NOTE:** *This API is supported from Klaytn v1.7.0.* + **NOTE:** *This API is supported from Kaia v1.7.0.* **JSONRPC:** `klay_getHeaderByHash` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getHeaderByNumber.yaml b/web3rpc/rpc-specs/paths/klay/block/getHeaderByNumber.yaml index d073da66d..35d0aeb85 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getHeaderByNumber.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getHeaderByNumber.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a header by number. This API works only on RPC call, not on JavaScript console. - **NOTE:** *This API is supported from Klaytn v1.7.0.* + **NOTE:** *This API is supported from Kaia v1.7.0.* **JSONRPC:** `klay_getHeaderByNumber` tags: diff --git a/web3rpc/rpc-specs/paths/klay/block/getStorageAt.yaml b/web3rpc/rpc-specs/paths/klay/block/getStorageAt.yaml index d410cc066..30f927317 100644 --- a/web3rpc/rpc-specs/paths/klay/block/getStorageAt.yaml +++ b/web3rpc/rpc-specs/paths/klay/block/getStorageAt.yaml @@ -17,7 +17,7 @@ paths: description: | Returns the value from a storage position at a given address. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getStorageAt` tags: diff --git a/web3rpc/rpc-specs/paths/klay/configuration/clientVersion.yaml b/web3rpc/rpc-specs/paths/klay/configuration/clientVersion.yaml index 9c4a6186a..614754bfc 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/clientVersion.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/clientVersion.yaml @@ -15,7 +15,7 @@ paths: operationId: clientVersion summary: "[Configuration] klay_clientVersion" description: | - Returns the current client version of a Klaytn node. + Returns the current client version of a Kaia node. **JSONRPC:** `klay_clientVersion` tags: @@ -35,7 +35,7 @@ paths: responses: 200: - description: The current client version of a Klaytn node. + description: The current client version of a Kaia node. content: application/json: schema: @@ -45,8 +45,8 @@ paths: properties: result: type: string - description: "The current client version of a Klaytn node." - example: "Klaytn/v0.9.1+3518232250/linux-amd64/go1.11.2" + description: "The current client version of a Kaia node." + example: "Kaia/v0.9.1+3518232250/linux-amd64/go1.11.2" x-codeSamples: - lang: "Shell" diff --git a/web3rpc/rpc-specs/paths/klay/configuration/protocolVersion.yaml b/web3rpc/rpc-specs/paths/klay/configuration/protocolVersion.yaml index c1cb53c57..d95c075ef 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/protocolVersion.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/protocolVersion.yaml @@ -15,7 +15,7 @@ paths: operationId: protocolVersion summary: "[Configuration] klay_protocolVersion" description: | - Returns the Klaytn protocol version of the node. The current version (as of v1.9.0) of Cypress/Baobab is istanbul/65. + Returns the Kaia protocol version of the node. The current version (as of v1.9.0) of Cypress/Baobab is istanbul/65. **JSONRPC:** `klay_protocolVersion` tags: @@ -35,7 +35,7 @@ paths: responses: 200: - description: Returns the Klaytn protocol version of the node. + description: Returns the Kaia protocol version of the node. content: application/json: schema: @@ -46,7 +46,7 @@ paths: result: type: string format: hex - description: "The Klaytn protocol version of the node." + description: "The Kaia protocol version of the node." example: "0xAE9F7BCC00" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/klay/filter/getFilterLogs.yaml b/web3rpc/rpc-specs/paths/klay/filter/getFilterLogs.yaml index ee7122498..fbde86a19 100644 --- a/web3rpc/rpc-specs/paths/klay/filter/getFilterLogs.yaml +++ b/web3rpc/rpc-specs/paths/klay/filter/getFilterLogs.yaml @@ -17,7 +17,7 @@ paths: description: | Returns an array of all logs matching filter with given id, which has been obtained using klay_newFilter.Note that filter ids returned by other filter creation functions, such as klay_newBlockFilter or klay_newPendingTransactionFilter, cannot be used with this function. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. - The number of maximum returned results in a single query (Default: 10,000). diff --git a/web3rpc/rpc-specs/paths/klay/filter/getLogs.yaml b/web3rpc/rpc-specs/paths/klay/filter/getLogs.yaml index 1909a2d16..c0d5f2d07 100644 --- a/web3rpc/rpc-specs/paths/klay/filter/getLogs.yaml +++ b/web3rpc/rpc-specs/paths/klay/filter/getLogs.yaml @@ -17,13 +17,13 @@ paths: description: | Returns an array of all logs matching a given filter object. - The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely. + The execution of this API can be limited by two node configurations to manage resources of Kaia node safely. -The number of maximum returned results in a single query (Default: 10,000). -The execution duration limit of a single query (Default: 10 seconds). - **NOTE**: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE**: In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `klay_getLogs` diff --git a/web3rpc/rpc-specs/paths/klay/filter/newFilter.yaml b/web3rpc/rpc-specs/paths/klay/filter/newFilter.yaml index dbb37540d..4090351e3 100644 --- a/web3rpc/rpc-specs/paths/klay/filter/newFilter.yaml +++ b/web3rpc/rpc-specs/paths/klay/filter/newFilter.yaml @@ -26,7 +26,7 @@ paths: - [A, B] "A in first position AND B in second position (and anything after)" - [[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)" - **NOTE:** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE:** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `klay_newFilter` @@ -105,7 +105,8 @@ components: Topics: type: array - description: (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. + description: | + (optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. items: type: string format: 32-byte DATA diff --git a/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml b/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml index 766982e6d..0569d6c77 100644 --- a/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml +++ b/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml @@ -17,7 +17,7 @@ paths: description: | Returns historical gas information for a range of blocks. - **NOTE:** This API is effective after Klaytn v1.8.0 + **NOTE:** This API is effective after Kaia v1.8.0 **JSONRPC:** `klay_feeHistory` tags: diff --git a/web3rpc/rpc-specs/paths/klay/transaction/call.yaml b/web3rpc/rpc-specs/paths/klay/transaction/call.yaml index 8641c718f..25b117149 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/call.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/call.yaml @@ -21,7 +21,7 @@ paths: If you deployed a contract, use klay_getTransactionReceipt to get the contract address. - **NOTE** In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available. + **NOTE** In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available. **JSONRPC:** `klay_call` diff --git a/web3rpc/rpc-specs/paths/klay/transaction/estimateComputationCost.yaml b/web3rpc/rpc-specs/paths/klay/transaction/estimateComputationCost.yaml index ecbee6896..78d0c9079 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/estimateComputationCost.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/estimateComputationCost.yaml @@ -17,7 +17,7 @@ paths: tags: - klay description: | - Generates and returns an estimate of how much computation cost will be spent to execute the transaction. Klaytn limits the computation cost of a transaction to 100000000 currently not to take too much time by a single transaction. The transaction will not be added to the blockchain like klay_estimateGas + Generates and returns an estimate of how much computation cost will be spent to execute the transaction. Kaia limits the computation cost of a transaction to 100000000 currently not to take too much time by a single transaction. The transaction will not be added to the blockchain like klay_estimateGas **JSONRPC:** `klay_estimateComputationCost` diff --git a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml index 36223d9bc..13ee05d57 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml @@ -17,7 +17,7 @@ paths: tags: - klay description: | - Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including Klaytn Virtual Machine mechanics and node performance. + Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including Kaia Virtual Machine mechanics and node performance. **JSONRPC:** `klay_estimateGas` diff --git a/web3rpc/rpc-specs/paths/klay/transaction/getTransactionByBlockNumberAndIndex.yaml b/web3rpc/rpc-specs/paths/klay/transaction/getTransactionByBlockNumberAndIndex.yaml index 5d374e79a..98d39b588 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/getTransactionByBlockNumberAndIndex.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/getTransactionByBlockNumberAndIndex.yaml @@ -17,7 +17,7 @@ paths: description: | Returns information about a transaction by block number and transaction index position. This API works only on RPC call, not on JavaScript console. - **NOTE:** *In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.* + **NOTE:** *In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.* **JSONRPC:** `klay_getTransactionByBlockNumberAndIndex` tags: diff --git a/web3rpc/rpc-specs/paths/klay/transaction/sendTransaction.yaml b/web3rpc/rpc-specs/paths/klay/transaction/sendTransaction.yaml index bfe66772b..232d701c4 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/sendTransaction.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/sendTransaction.yaml @@ -15,7 +15,7 @@ paths: operationId: sendTransaction summary: "[Transaction] klay_sendTransaction" description: | - Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Klaytn network. + Constructs a transaction with given parameters, signs the transaction with a sender's private key and propagates the transaction to Kaia network. `klay_sendTransaction` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `klay_sendTransaction`. diff --git a/web3rpc/rpc-specs/paths/klay/transaction/sendTransactionAsFeePayer.yaml b/web3rpc/rpc-specs/paths/klay/transaction/sendTransactionAsFeePayer.yaml index 3fd030318..369406efb 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/sendTransactionAsFeePayer.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/sendTransactionAsFeePayer.yaml @@ -15,7 +15,7 @@ paths: operationId: sendTransactionAsFeePayer summary: "[Transaction] klay_sendTransactionAsFeePayer" description: | - Constructs a transaction with given parameters, signs the transaction with a fee payer's private key and propagates the transaction to Klaytn network. This API supports only fee delegated type (including partial fee delegated type) transactions. + Constructs a transaction with given parameters, signs the transaction with a fee payer's private key and propagates the transaction to Kaia network. This API supports only fee delegated type (including partial fee delegated type) transactions. `klay_sendTransactionAsFeePayer` will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with. Steps to test `klay_sendTransactionAsFeePayer`. diff --git a/web3rpc/rpc-specs/paths/klay/transaction/signTransaction.yaml b/web3rpc/rpc-specs/paths/klay/transaction/signTransaction.yaml index ddac2a96d..cec821391 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/signTransaction.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/signTransaction.yaml @@ -15,7 +15,7 @@ paths: operationId: signTransaction summary: "[Transaction] klay_signTransaction" description: | - Constructs a transaction with given parameters and signs the transaction with a sender's private key. This method can be used either to generate a sender signature or to make a final raw transaction that is ready to submit to Klaytn network. + Constructs a transaction with given parameters and signs the transaction with a sender's private key. This method can be used either to generate a sender signature or to make a final raw transaction that is ready to submit to Kaia network. **JSONRPC:** `klay_signTransaction` diff --git a/web3rpc/rpc-specs/paths/klay/transaction/signTransactionAsFeePayer.yaml b/web3rpc/rpc-specs/paths/klay/transaction/signTransactionAsFeePayer.yaml index 0bf174086..1ccdfd0cb 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/signTransactionAsFeePayer.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/signTransactionAsFeePayer.yaml @@ -15,7 +15,7 @@ paths: operationId: signTransactionAsFeePayer summary: "[Transaction] klay_signTransactionAsFeePayer" description: | - Constructs a transaction with given parameters and signs the transaction with a fee payer's private key. This method can be used either to generate a fee payer signature or to make a final raw transaction that is ready to submit to Klaytn network. In case you just want to extract the fee-payer signature, simply take the feePayerSignatures from the result. Note that the raw transaction is not final if the sender's signature is not attached (that is, signatures in tx is empty). + Constructs a transaction with given parameters and signs the transaction with a fee payer's private key. This method can be used either to generate a fee payer signature or to make a final raw transaction that is ready to submit to Kaia network. In case you just want to extract the fee-payer signature, simply take the feePayerSignatures from the result. Note that the raw transaction is not final if the sender's signature is not attached (that is, signatures in tx is empty). **JSONRPC:** `klay_signTransactionAsFeePayer` diff --git a/web3rpc/rpc-specs/paths/mainbridge/addPeer.yaml b/web3rpc/rpc-specs/paths/mainbridge/addPeer.yaml index 44adf6fe8..344a65c43 100644 --- a/web3rpc/rpc-specs/paths/mainbridge/addPeer.yaml +++ b/web3rpc/rpc-specs/paths/mainbridge/addPeer.yaml @@ -38,7 +38,7 @@ paths: responses: 200: - description: Returns bridge node information including the KNI (Klaytn Network Identifier) of the node. + description: Returns bridge node information including the KNI (Kaia Network Identifier) of the node. content: application/json: schema: diff --git a/web3rpc/rpc-specs/paths/mainbridge/nodeInfo.yaml b/web3rpc/rpc-specs/paths/mainbridge/nodeInfo.yaml index 5dfb75eca..f010ed226 100644 --- a/web3rpc/rpc-specs/paths/mainbridge/nodeInfo.yaml +++ b/web3rpc/rpc-specs/paths/mainbridge/nodeInfo.yaml @@ -17,7 +17,7 @@ paths: - mainbridge operationId: nodeInfo description: | - Returns bridge node information including the KNI (Klaytn Network Identifier) of the node. A mainbridge node can connect to a subbrige node via the KNI. + Returns bridge node information including the KNI (Kaia Network Identifier) of the node. A mainbridge node can connect to a subbrige node via the KNI. **JSONRPC:** `mainbridge_nodeInfo` @@ -31,7 +31,7 @@ paths: responses: 200: - description: Returns bridge node information including the KNI (Klaytn Network Identifier) of the node. + description: Returns bridge node information including the KNI (Kaia Network Identifier) of the node. content: application/json: schema: diff --git a/web3rpc/rpc-specs/paths/mainbridge/removePeer.yaml b/web3rpc/rpc-specs/paths/mainbridge/removePeer.yaml index 9d22f7189..3132f277a 100644 --- a/web3rpc/rpc-specs/paths/mainbridge/removePeer.yaml +++ b/web3rpc/rpc-specs/paths/mainbridge/removePeer.yaml @@ -38,7 +38,7 @@ paths: responses: 200: - description: Returns bridge node information including the KNI (Klaytn Network Identifier) of the node. + description: Returns bridge node information including the KNI (Kaia Network Identifier) of the node. content: application/json: schema: diff --git a/web3rpc/rpc-specs/paths/net/networkID.yaml b/web3rpc/rpc-specs/paths/net/networkID.yaml index 847e6c401..459c5058f 100644 --- a/web3rpc/rpc-specs/paths/net/networkID.yaml +++ b/web3rpc/rpc-specs/paths/net/networkID.yaml @@ -46,7 +46,7 @@ paths: result: type: string format: hex - description: The integer of the network identifier. "1001" Klaytn Baobab testnet."8217" Klaytn Cypress mainnet. + description: The integer of the network identifier. "1001" Kaia Baobab testnet."8217" Kaia Cypress mainnet. example: "1001" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/net/version.yaml b/web3rpc/rpc-specs/paths/net/version.yaml index ff5e1a700..a21a4eae7 100644 --- a/web3rpc/rpc-specs/paths/net/version.yaml +++ b/web3rpc/rpc-specs/paths/net/version.yaml @@ -15,7 +15,7 @@ paths: operationId: version summary: "net_version" description: | - Return the current klaytn protocol version. + Return the current kaia protocol version. **JSONRPC:** `net_version` tags: @@ -34,7 +34,7 @@ paths: responses: 200: - description: Return the current klaytn protocol version. + description: Return the current kaia protocol version. content: application/json: schema: @@ -45,7 +45,7 @@ paths: result: type: string format: hex - description: The integer of the klaytn protocol version. "1001" Klaytn Baobab testnet."8217" Klaytn Cypress mainnet. + description: The integer of the kaia protocol version. "1001" Kaia Baobab testnet."8217" Kaia Cypress mainnet. example: "1001" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/personal/importRawKey.yaml b/web3rpc/rpc-specs/paths/personal/importRawKey.yaml index c585cbd8e..fe5747a14 100644 --- a/web3rpc/rpc-specs/paths/personal/importRawKey.yaml +++ b/web3rpc/rpc-specs/paths/personal/importRawKey.yaml @@ -15,7 +15,7 @@ paths: operationId: importRawKey summary: "personal_importRawKey" description: | - Imports the given unencrypted private key (hex string without leading '0x') or a Klaytn wallet key into the key store, encrypting it with the passphrase. + Imports the given unencrypted private key (hex string without leading '0x') or a Kaia wallet key into the key store, encrypting it with the passphrase. Returns the address of the imported account. @@ -28,7 +28,7 @@ paths: required: true schema: type: string - description: The unencrypted private key (hex string without leading '0x') or a Klaytn wallet key. + description: The unencrypted private key (hex string without leading '0x') or a Kaia wallet key. in: query - name: passphrase required: true @@ -96,7 +96,7 @@ components: Keydata: type: string title: Keydata - description: The unencrypted private key (hex string without leading '0x') or a Klaytn wallet key. + description: The unencrypted private key (hex string without leading '0x') or a Kaia wallet key. Passphrase: type: string title: Passphrase diff --git a/web3rpc/rpc-specs/paths/personal/listAccounts.yaml b/web3rpc/rpc-specs/paths/personal/listAccounts.yaml index e08777ae0..73dca6448 100644 --- a/web3rpc/rpc-specs/paths/personal/listAccounts.yaml +++ b/web3rpc/rpc-specs/paths/personal/listAccounts.yaml @@ -15,7 +15,7 @@ paths: operationId: listAccounts summary: "personal_listAccounts" description: | - Returns all the Klaytn account addresses of all keys in the key store. + Returns all the Kaia account addresses of all keys in the key store. **JSONRPC:** `personal_listAccounts` tags: @@ -37,7 +37,7 @@ paths: responses: 200: - description: Returns all the Klaytn account addresses of all keys in the key store. + description: Returns all the Kaia account addresses of all keys in the key store. content: application/json: schema: @@ -47,7 +47,7 @@ paths: properties: result: type: string - description: The list of all the Klaytn account addresses + description: The list of all the Kaia account addresses example: ["0x5e97870f263700f46aa00d967821199b9bc5a120", "0x3d80b31a78c30fc628f20b2c89d7ddbf6e53cedc"] x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/personal/newAccount.yaml b/web3rpc/rpc-specs/paths/personal/newAccount.yaml index 44efb1ce8..49f095da9 100644 --- a/web3rpc/rpc-specs/paths/personal/newAccount.yaml +++ b/web3rpc/rpc-specs/paths/personal/newAccount.yaml @@ -17,7 +17,7 @@ paths: description: | Generates a new private key and stores it in the key store directory. The key file is encrypted with the given passphrase. Returns the address of the new account. - At the Klaytn console, newAccount will prompt for a passphrase when it is not supplied as the argument. + At the Kaia console, newAccount will prompt for a passphrase when it is not supplied as the argument. **JSONRPC:** `personal_newAccount` tags: diff --git a/web3rpc/rpc-specs/paths/personal/replaceRawKey.yaml b/web3rpc/rpc-specs/paths/personal/replaceRawKey.yaml index e30a9070c..68ba6ab85 100644 --- a/web3rpc/rpc-specs/paths/personal/replaceRawKey.yaml +++ b/web3rpc/rpc-specs/paths/personal/replaceRawKey.yaml @@ -15,7 +15,7 @@ paths: operationId: replaceRawKey summary: "personal_replaceRawKey" description: | - Replaces the encrypted key file in the key store with the given unencrypted private key (hex string without leading '0x') or a Klaytn wallet key, encrypting it with the new passphrase. It also receives the old passphrase to decrypt the old private key before replacement. If it is failed to decrypt, or can not find the matching account, it throws an error. + Replaces the encrypted key file in the key store with the given unencrypted private key (hex string without leading '0x') or a Kaia wallet key, encrypting it with the new passphrase. It also receives the old passphrase to decrypt the old private key before replacement. If it is failed to decrypt, or can not find the matching account, it throws an error. Returns the address of the replaced account if successful. @@ -28,7 +28,7 @@ paths: required: true schema: type: string - description: The unencrypted private key (hex string without leading '0x') or a Klaytn wallet key. + description: The unencrypted private key (hex string without leading '0x') or a Kaia wallet key. in: query - name: oldPassphrase required: true @@ -102,7 +102,7 @@ components: Keydata: type: string title: Keydata - description: The unencrypted private key (hex string without leading '0x') or a Klaytn wallet key. + description: The unencrypted private key (hex string without leading '0x') or a Kaia wallet key. OldPassphrase: type: string title: OldPassphrase diff --git a/web3rpc/rpc-specs/paths/personal/unlockAccount.yaml b/web3rpc/rpc-specs/paths/personal/unlockAccount.yaml index 5e227c865..b6bb7c818 100644 --- a/web3rpc/rpc-specs/paths/personal/unlockAccount.yaml +++ b/web3rpc/rpc-specs/paths/personal/unlockAccount.yaml @@ -19,7 +19,7 @@ paths: Both passphrase and unlock duration are optional when using the JavaScript console. If the passphrase is not supplied as an argument, the console will prompt for the passphrase interactively. - The unencrypted key will be held in memory until the unlock duration expires. If the unlock duration defaults to 300 seconds. An explicit duration of zero seconds unlocks the key until the Klaytn local node exits. + The unencrypted key will be held in memory until the unlock duration expires. If the unlock duration defaults to 300 seconds. An explicit duration of zero seconds unlocks the key until the Kaia local node exits. The account can be used with klay_sign and klay_sendTransaction while it is unlocked. diff --git a/web3rpc/rpc-specs/paths/subbridge/nodeInfo.yaml b/web3rpc/rpc-specs/paths/subbridge/nodeInfo.yaml index d3708e675..137f412bb 100644 --- a/web3rpc/rpc-specs/paths/subbridge/nodeInfo.yaml +++ b/web3rpc/rpc-specs/paths/subbridge/nodeInfo.yaml @@ -17,7 +17,7 @@ paths: - subbridge operationId: nodeInfo description: | - Returns bridge node information including the KNI (Klaytn Network Identifier) of the node. A subbridge node can connect to a mainbridge node via the KNI. + Returns bridge node information including the KNI (Kaia Network Identifier) of the node. A subbridge node can connect to a mainbridge node via the KNI. **JSONRPC:** `subbridge_nodeInfo`