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

Release v1.6.1-rc.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@jimni1222 jimni1222 released this 06 Apr 01:38
· 692 commits to dev since this release
a671309

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...).
    • Please refer to Klaytn Docs for more details.
  • Support fee-delegation feature with caver.kct

    • You can pass sendOptions to deploy function to define additional fields to use fee-delegation when deploy a KCT via caver.kct.
      • You can pass the sendOptions instead of deployerAddress with caver.kct.kip7 like caver.kct.kip7.deploy({…}, {from, feeDelegation, feePayer, feeRatio}).
      • You can pass the sendOptions instead of deployerAddress with caver.kct.kip17 like caver.kct.kip17.deploy({…}, {from, feeDelegation, feePayer, feeRatio}).
      • You can pass the sendOptions instead of deployerAddress with caver.kct.ki37 like caver.kct.kip37.deploy({…}, {from, feeDelegation, feePayer, feeRatio}).
    • You can define additional fields in sendOptions to use fee-delegation when execute a KCT via caver.kct.
      • You can use fee-delegation with methods of caver.kct.kip7 like kip7.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio}).
      • You can use fee-delegation with methods of caver.kct.kip17 like kip17.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio}).
      • You can use fee-delegation with methods of caver.kct.kip37 like kip37.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio}).
    • You can use sign function to sign a transaction as a sender and define additional fields to use fee-delegation.
      • You can use kip7.sign to sign TxTypeSmartContractDeploy like kip7.sign({from, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip7.sign to sign TxTypeFeeDelegatedSmartContractDeploy like kip7.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip7.sign to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip7.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip7.sign to sign TxTypeSmartContractExecution like kip7.sign({from, …}, functionName, arguments…).
      • You can use kip7.sign to sign TxTypeFeeDelegatedSmartContractExecution like kip7.sign({from, feeDelegation, …}, functionName, arguments…).
      • You can use kip7.sign to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip7.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…).
      • You can use kip17.sign to sign TxTypeSmartContractDeploy like kip17.sign({from, …}, 'constructor', caver.kct.kip17.byteCode, arguments…).
      • You can use kip17.sign to sign TxTypeFeeDelegatedSmartContractDeploy like kip17.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip17.byteCode, arguments…).
      • You can use kip17.sign to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip17.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip17.byteCode, arguments…).
      • You can use kip17.sign to sign TxTypeSmartContractExecution like kip17.sign({from, …}, functionName, arguments…).
      • You can use kip17.sign to sign TxTypeFeeDelegatedSmartContractExecution like kip17.sign({from, feeDelegation, …}, functionName, arguments…).
      • You can use kip17.sign to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip17.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…).
      • You can use kip37.sign to sign TxTypeSmartContractDeploy like kip37.sign({from, …}, 'constructor', caver.kct.kip37.byteCode, arguments…).
      • You can use kip37.sign to sign TxTypeFeeDelegatedSmartContractDeploy like kip37.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip37.byteCode, arguments…).
      • You can use kip37.sign to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip37.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip37.sign to sign TxTypeSmartContractExecution like kip37.sign({from, …}, functionName, arguments…).
      • You can use kip37.sign to sign TxTypeFeeDelegatedSmartContractExecution like kip37.sign({from, feeDelegation, …}, functionName, arguments…).
      • You can use kip37.sign to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip37.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…).
    • You can use signAsFeePayer function to sign a transaction as a fee payer and define additional fields to use fee-delegation.
      • You can use kip7.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeploy like kip7.signAsFeePayer({from, feeDelegation, feePayer, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip7.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip7.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip7.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecution like kip7.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…).
      • You can use kip7.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip7.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…).
      • You can use kip17.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeploy like kip17.signAsFeePayer({from, feeDelegation, feePayer, …}, 'constructor', caver.kct.kip17.byteCode, arguments…).
      • You can use kip17.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip17.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip17.byteCode, arguments…).
      • You can use kip17.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecution like kip17.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…).
      • You can use kip17.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip17.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…).
      • You can use kip37.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeploy like kip37.signAsFeePayer({from, feePayer, feeDelegation, …}, 'constructor', caver.kct.kip37.byteCode, arguments…).
      • You can use kip37.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractDeployWithRatio like kip37.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…).
      • You can use kip37.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecution like kip37.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…).
      • You can use kip37.signAsFeePayer to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio like kip37.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…).
    • Please refer to Klaytn Docs for more details.