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

Releases: klaytn/caver-js

Release v1.6.2-rc.2

04 Jun 04:24
25390e1
Compare
Choose a tag to compare
Release v1.6.2-rc.2 Pre-release
Pre-release

v1.6.2-rc.2 Release Notes

Fixes

  • Fixed an error caused by trimming input data when decoding LegacyTransaction. (#461)

Release v1.6.2-rc.1

19 Apr 06:35
ae1b512
Compare
Choose a tag to compare
Release v1.6.2-rc.1 Pre-release
Pre-release

v1.6.2-rc.1 Release Notes

Fixes

  • Fixed caver.abi.encodeParameters logic to handle fixed lenght tuple array type. (#456)

Release v1.6.1

14 Apr 04:55
1263c10
Compare
Choose a tag to compare

v1.6.1-rc.2 Release Notes

New Features

  • Supported create function to provide the same usability.

    • The Contract, ABI and KCT Layer supports create function.
      • The caver.contract.create creates a Contract instance.
      • The caver.kct.kip7.create creates a KIP7 instance.
      • The caver.kct.kip17.create creates a KIP17 instance.
      • The caver.kct.kip37.create creates a KIP37 instance.
    • The Transaction Layer supports create function.
      • The caver.transaction.valueTransfer.create creates a TxTypeValueTransfer transaction instance.
      • The caver.transaction.feeDelegatedValueTransfer.create creates a TxTypeFeeDelegatedValueTransfer transaction instance.
      • The caver.transaction.feeDelegatedValueTransferWithRatio.create creates a TxTypeFeeDelegatedValueTransferWithRatio transaction instance.
      • The caver.transaction.valueTransferMemo.create creates a TxTypeValueTransferMemo transaction instance.
      • The caver.transaction.feeDelegatedValueTransferMemo.create creates a TxTypeFeeDelegatedValueTransferMemo transaction instance.
      • The caver.transaction.feeDelegatedValueTransferMemoWithRatio.create creates a TxTypeFeeDelegatedValueTransferMemoWithRatio transaction instance.
      • The caver.transaction.accountUpdate.create creates a TxTypeAccountUpdate transaction instance.
      • The caver.transaction.feeDelegatedAccountUpdate.create creates a TxTypeFeeDelegatedAccountUpdate transaction instance.
      • The caver.transaction.feeDelegatedAccountUpdateWithRatio.create creates a TxTypeFeeDelegatedAccountUpdateWithRatio transaction instance.
      • The caver.transaction.smartContractDeploy.create creates a TxTypeSmartContractDeploy transaction instance.
      • The caver.transaction.feeDelegatedSmartContractDeploy.create creates a TxTypeFeeDelegatedSmartContractDeploy transaction instance.
      • The caver.transaction.feeDelegatedSmartContractDeployWithRatio.create creates a TxTypeFeeDelegatedSmartContractDeployWithRatio transaction instance.
      • The caver.transaction.smartContractExecution.create creates a TxTypeSmartContractExecution transaction instance.
      • The caver.transaction.feeDelegatedSmartContractExecution.create creates a TxTypeFeeDelegatedSmartContractExecution transaction instance.
      • The caver.transaction.feeDelegatedSmartContractExecutionWithRatio.create creates a TxTypeFeeDelegatedSmartContractExecutionWithRatio transaction instance.
      • The caver.transaction.cancel.create creates a TxTypeCancel transaction instance.
      • The caver.transaction.feeDelegatedCancel.create creates a TxTypeFeeDelegatedCancel transaction instance.
      • The caver.transaction.feeDelegatedCancelWithRatio.create creates a TxTypeFeeDelegatedCancelWithRatio transaction instance.
      • The caver.transaction.chainDataAnchoring.create creates a TxTypeChainDataAnchoring transaction instance.
      • The caver.transaction.feeDelegatedChainDataAnchoring.create creates a TxTypeFeeDelegatedChainDataAnchoring transaction instance.
      • The caver.transaction.feeDelegatedChainDataAnchoringWithRatio.create creates a TxTypeFeeDelegatedChainDataAnchoringWithRatio transaction instance.
    • Please refer to Klaytn Docs for more details.
  • Introduced new shortcut functions in caver.contract to provide the same usability.

    • The contract.deploy function is overloaded and provided.
      • You can use contract.deploy to deploy smart contracts like contract.deploy({from, … }, byteCode, arguments…).
    • The contract.send function executes the smart contract.
      • You can use contract.send to execute smart contracts like contract.send({from, … }, functionName, arguments...).
    • The contract.call function call the smart contract.
      • You can use contract.call to call smart contracts without callObject like contract.call(functionName, arguments...).
      • You can use contract.call to call smart contracts with callObject like contract.call(callObject, functionName, arguments...).
    • The contract.sign function signs the smart contract transaction as a sender and returns the signed transaction instance.
      • You can use contract.sign to sign TxTypeSmartContractDeploy as a sender like contract.sign({from, … }, 'constructor', byteCode, arguments...).
      • You can use contract.sign to sign TxTypeSmartContractExecution as a sender like contract.sign({from, … }, functionName, arguments...).
    • The contract.signAsFeePayer function signs the smart contract transaction as a fee payer and returns the signed transaction instance. To create fee delegation transaction and sign the transaction as a fee payer, feeDelegation field should be defined as true and feePayer should be defined.
      • You can use contract.signAsFeePayer to sign TxTypeSmartContractDeploy as a fee payer like contract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, 'constructor', byteCode, arguments...).
      • You can use contract.signAsFeePayer to sign TxTypeSmartContractExecution as a fee payer like contract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, functionName, arguments...).
    • Please refer to Klaytn Docs for more details.
  • Support fee-delegation feature with caver.contract

    • In caver.contract, additional fields related to fee-delegation can be defined in contract.options. Therefore, if there is a value you want to use as default with a Contract instance, you can define it in contract.options.
      • You can define feeDelegation field in contract.options to use fee delegation transaction as a default like contract.options.feeDelegation = true.
      • You can define feePayer field in contract.options to use default fee payer address like contract.options.feePayer = '0x{address in hex}'.
      • You can define feeRatio field in contract.options to use default feeRatio like contract.options.feeRatio = 30’.
    • You can define additional fields in sendOptions to use fee-delegation when deploy a smart contract via Contract class.
      • You can use contract.deploy like contract.deploy({from, gas, feePayer, feeDelegation, feeRatio}, byteCode, arguments…).
      • You can use contract.deploy like contract.deploy({data: byteCode, arguments: […]}).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods['constructor'] like contract.methods['constructor'](byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods.constructor like contract.methods.constructor(byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
    • You can define additional fields in sendOptions to use fee-delegation when executing a smart contract via Contract class.
      • You can use contract.send like contract.send({from, gas, feePayer, feeDelegation, feeRatio}, arguments…).
      • You can use contract.methods[functionName] like contract.methods[functionName](arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods.functionName like contract.methods.functionName(arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
    • You can define additional fields in sendOptions to use fee-delegation when signing a TxTypeFeeDelegatedSmartContractDeploy or TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender.
      • You can define the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like contract.sign({from, feeDelegation, feePayer… }, 'constructor', byteCode, arguments...).
      • You can define the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when signing a TxTypeFeeDelegatedSmartContractExecution or TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender.
      • You can define the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like contract.sign({from, feeDelegation, feePayer… }, functionName, arguments...).
      • You can define the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when signing a TxTypeFeeDelegatedSmartContractDeploy or TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender.
      • You can define additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like contract.sign({from, feeDelegation, feePayer… }, 'constructor', byteCode, arguments...).
      • You can define additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when signing a TxTypeFeeDelegatedSmartContractExecution or TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender.
      • You can define additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like contract.sign({from, feeDelegation, feePayer… }, functionName, arguments...).
      • You can define additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender like `contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCod...
Read more

Release v1.6.1-rc.6

13 Apr 05:21
a47c626
Compare
Choose a tag to compare
Release v1.6.1-rc.6 Pre-release
Pre-release

v1.6.1-rc.6 Release Notes

Fixes

  • Call redefined constructor when caver.contract.create is called. (#452)

Release v1.6.1-rc.5

12 Apr 02:50
153581a
Compare
Choose a tag to compare
Release v1.6.1-rc.5 Pre-release
Pre-release

v1.6.1-rc.5 Release Notes

Fixes

  • Added await to wait error handling with Promise. (#450)

Release v1.6.1-rc.4

09 Apr 05:07
76e5b4c
Compare
Choose a tag to compare
Release v1.6.1-rc.4 Pre-release
Pre-release

v1.6.1-rc.4 Release Notes

Fixes

  • Updated node version in Circle CI and library version. (#445)
  • Added logic to handle decimal points in BigNumber. (#446)
  • Modified to use fixed version of libraries. (#449)

Release v1.6.1-rc.3

06 Apr 05:30
8a8d8b1
Compare
Choose a tag to compare
Release v1.6.1-rc.3 Pre-release
Pre-release

v1.6.1-rc.3 Release Notes

Fixes

  • Updated cypress library version. (#440)

Release v1.6.1-rc.2

06 Apr 01:38
a671309
Compare
Choose a tag to compare
Release v1.6.1-rc.2 Pre-release
Pre-release

v1.6.1-rc.2 Release Notes

New Features

  • Support create function to provide the same usability

    • The Contract, ABI and KCT Layer support create function.
      • The caver.contract.create creates a Contract instance.
      • The caver.kct.kip7.create creates a KIP7 instance.
      • The caver.kct.kip17.create creates a KIP17 instance.
      • The caver.kct.kip37.create creates a KIP37 instance.
    • The Transaction Layer support create function.
      • The caver.transaction.valueTransfer.create creates a TxTypeValueTransfer transaction instance.
      • The caver.transaction.feeDelegatedValueTransfer.create creates a TxTypeFeeDelegatedValueTransfer transaction instance.
      • The caver.transaction.feeDelegatedValueTransferWithRatio.create creates a TxTypeFeeDelegatedValueTransferWithRatio transaction instance.
      • The caver.transaction.valueTransferMemo.create creates a TxTypeValueTransferMemo transaction instance.
      • The caver.transaction.feeDelegatedValueTransferMemo.create creates a TxTypeFeeDelegatedValueTransferMemo transaction instance.
      • The caver.transaction.feeDelegatedValueTransferMemoWithRatio.create creates a TxTypeFeeDelegatedValueTransferMemoWithRatio transaction instance.
      • The caver.transaction.accountUpdate.create creates a TxTypeAccountUpdate transaction instance.
      • The caver.transaction.feeDelegatedAccountUpdate.create creates a TxTypeFeeDelegatedAccountUpdate transaction instance.
      • The caver.transaction.feeDelegatedAccountUpdateWithRatio.create creates a TxTypeFeeDelegatedAccountUpdateWithRatio transaction instance.
      • The caver.transaction.smartContractDeploy.create creates a TxTypeSmartContractDeploy transaction instance.
      • The caver.transaction.feeDelegatedSmartContractDeploy.create creates a TxTypeFeeDelegatedSmartContractDeploy transaction instance.
      • The caver.transaction.feeDelegatedSmartContractDeployWithRatio.create creates a TxTypeFeeDelegatedSmartContractDeployWithRatio transaction instance.
      • The caver.transaction.smartContractExecution.create creates a TxTypeSmartContractExecution transaction instance.
      • The caver.transaction.feeDelegatedSmartContractExecution.create creates a TxTypeFeeDelegatedSmartContractExecution transaction instance.
      • The caver.transaction.feeDelegatedSmartContractExecutionWithRatio.create creates a TxTypeFeeDelegatedSmartContractExecutionWithRatio transaction instance.
      • The caver.transaction.cancel.create creates a TxTypeCancel transaction instance.
      • The caver.transaction.feeDelegatedCancel.create creates a TxTypeFeeDelegatedCancel transaction instance.
      • The caver.transaction.feeDelegatedCancelWithRatio.create creates a TxTypeFeeDelegatedCancelWithRatio transaction instance.
      • The caver.transaction.chainDataAnchoring.create creates a TxTypeChainDataAnchoring transaction instance.
      • The caver.transaction.feeDelegatedChainDataAnchoring.create creates a TxTypeFeeDelegatedChainDataAnchoring transaction instance.
      • The caver.transaction.feeDelegatedChainDataAnchoringWithRatio.create creates a TxTypeFeeDelegatedChainDataAnchoringWithRatio transaction instance.
    • Please refer to Klaytn Docs for more details.
  • Support short cut functions in caver.contract to provide the same usability

    • The contract.deploy function is overloaded and provided.
      • You can use contract.deploy to deploy smart contract like contract.deploy({from, … }, byteCode, arguments…).
    • The contract.send function executes the smart contract.
      • You can use contract.send to execute smart contract like contract.send({from, … }, functionName, arguments...).
    • The contract.call function call the smart contract.
      • You can use contract.call to call smart contract without callObject like contract.call(functionName, arguments...).
      • You can use contract.call to call smart contract with callObject like contract.call(callObject, functionName, arguments...).
    • The contract.sign function signs the smart contract transaction as a sender and returns signed transaction instance.
      • You can use contract.sign to sign TxTypeSmartContractDeploy as a sender like contract.sign({from, … }, 'constructor', byteCode, arguments...).
      • You can use contract.sign to sign TxTypeSmartContractExecution as a sender like contract.sign({from, … }, functionName, arguments...).
    • The contract.signAsFeePayer function signs the smart contract transaction as a fee payer and returns signed transaction instance. To create fee delegation transaction and sign the transaction as a fee payer, feeDelegation field should be defined to true and feePayer should be defined.
      • You can use contract.signAsFeePayer to sign TxTypeSmartContractDeploy as a fee payer like contract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, 'constructor', byteCode, arguments...).
      • You can use contract.signAsFeePayer to sign TxTypeSmartContractExecution as a fee payer like contract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, functionName, arguments...).
    • Please refer to Klaytn Docs for more details.
  • Support fee-delegation feature with caver.contract

    • In caver.contract, additional fields related to fee-delegation can be defined in contract.options. Therefore, if there is a value you want to use as default with a Contract instance, you can define it in contract.options.
      • You can define feeDelegation field in contract.options to use fee delegation transaction as a default like contract.options.feeDelegation = true.
      • You can define feePayer field in contract.options to use default fee payer address like contract.options.feePayer = '0x{address in hex}'.
      • You can define feeRatio field in contract.options to use default feeRatio like contract.options.feeRatio = 30’.
    • You can define additional fields in sendOptions to use fee-delegation when deploy a smart contract via Contract class.
      • You can use contract.deploy like contract.deploy({from, gas, feePayer, feeDelegation, feeRatio}, byteCode, arguments…).
      • You can use contract.deploy like contract.deploy({data: byteCode, arguments: […]}).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods['constructor'] like contract.methods['constructor'](byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods.constructor like contract.methods.constructor(byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
    • You can define additional fields in sendOptions to use fee-delegation when execute a smart contract via Contract class.
      • You can use contract.send like contract.send({from, gas, feePayer, feeDelegation, feeRatio}, arguments…).
      • You can use contract.methods[functionName] like contract.methods[functionName](arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
      • You can use contract.methods.functionName like contract.methods.functionName(arguments...).send({from, gas, feePayer, feeDelegation, feeRatio}).
    • You can define additional fields in sendOptions to use fee-delegation when sign a TxTypeFeeDelegatedSmartContractDeploy or TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender.
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like contract.sign({from, feeDelegation, feePayer… }, 'constructor', byteCode, arguments...).
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when sign a TxTypeFeeDelegatedSmartContractExecution or TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender.
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like contract.sign({from, feeDelegation, feePayer… }, functionName, arguments...).
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when sign a TxTypeFeeDelegatedSmartContractDeploy or TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender.
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like contract.sign({from, feeDelegation, feePayer… }, 'constructor', byteCode, arguments...).
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeployWithRatio as a sender like contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments...).
    • You can define additional fields in sendOptions to use fee-delegation when sign a TxTypeFeeDelegatedSmartContractExecution or TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender.
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like contract.sign({from, feeDelegation, feePayer… }, functionName, arguments...).
      • You can defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio as a sender like `contract.sign({from, feeDelegation, feePayer, feeRatio… }, 'constructor', byteCode, arguments.....
Read more

Release v1.6.1-rc.1

23 Mar 00:21
dbcf146
Compare
Choose a tag to compare
Release v1.6.1-rc.1 Pre-release
Pre-release

v1.6.1-rc.1 Release Notes

Fixes

  • Modified module dependencies to resolve vulnerability. (#433)

Release v1.6.0

15 Mar 06:29
f9d5d42
Compare
Choose a tag to compare

v1.6.0 Release Notes

New Features

  • caver.abi supports tuple type.
    • You can encode and decode tuple-typed parameters using the functions below.
      • caver.abi.encodeParameter
      • caver.abi.encodeParameters
      • caver.abi.decodeParameter
      • caver.abi.decodeParameters
    • For more information on tuple type, please refer to Solidity document.

Improvements

  • Built a test environment to check whether caver-js operates normally in a web environment, and conduct a web environment operation test in Circle CI. (#426, #427, #432)