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
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
- 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.
- The
- Please refer to Klaytn Docs for more details.
- The Contract, ABI and KCT Layer support
-
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 likecontract.deploy({from, … }, byteCode, arguments…)
.
- You can use
- The
contract.send
function executes the smart contract.- You can use
contract.send
to execute smart contract likecontract.send({from, … }, functionName, arguments...)
.
- You can use
- The
contract.call
function call the smart contract.- You can use
contract.call
to call smart contract without callObject likecontract.call(functionName, arguments...)
. - You can use
contract.call
to call smart contract with callObject likecontract.call(callObject, functionName, arguments...)
.
- You can use
- 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 likecontract.sign({from, … }, 'constructor', byteCode, arguments...)
. - You can use
contract.sign
to sign TxTypeSmartContractExecution as a sender likecontract.sign({from, … }, functionName, arguments...)
.
- You can use
- 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 totrue
andfeePayer
should be defined.- You can use
contract.signAsFeePayer
to sign TxTypeSmartContractDeploy as a fee payer likecontract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, 'constructor', byteCode, arguments...)
. - You can use
contract.signAsFeePayer
to sign TxTypeSmartContractExecution as a fee payer likecontract.signAsFeePayer({from, �feePayer, feeDelegation: true, … }, functionName, arguments...)
.
- You can use
- Please refer to Klaytn Docs for more details.
- The
-
Support fee-delegation feature with
caver.contract
- In
caver.contract
, additional fields related to fee-delegation can be defined incontract.options
. Therefore, if there is a value you want to use as default with a Contract instance, you can define it incontract.options
.- You can define
feeDelegation
field incontract.options
to use fee delegation transaction as a default likecontract.options.feeDelegation = true
. - You can define
feePayer
field incontract.options
to use default fee payer address likecontract.options.feePayer = '0x{address in hex}'
. - You can define
feeRatio
field incontract.options
to use default feeRatio likecontract.options.feeRatio = 30’
.
- You can define
- You can define additional fields in sendOptions to use fee-delegation when deploy a smart contract via Contract class.
- You can use
contract.deploy
likecontract.deploy({from, gas, feePayer, feeDelegation, feeRatio}, byteCode, arguments…)
. - You can use
contract.deploy
likecontract.deploy({data: byteCode, arguments: […]}).send({from, gas, feePayer, feeDelegation, feeRatio})
. - You can use
contract.methods['constructor']
likecontract.methods['constructor'](byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio})
. - You can use
contract.methods.constructor
likecontract.methods.constructor(byteCode, arguments...).send({from, gas, feePayer, feeDelegation, feeRatio})
.
- You can use
- You can define additional fields in sendOptions to use fee-delegation when execute a smart contract via Contract class.
- You can use
contract.send
likecontract.send({from, gas, feePayer, feeDelegation, feeRatio}, arguments…)
. - You can use
contract.methods[functionName]
likecontract.methods[functionName](arguments...).send({from, gas, feePayer, feeDelegation, feeRatio})
. - You can use
contract.methods.functionName
likecontract.methods.functionName(arguments...).send({from, gas, feePayer, feeDelegation, feeRatio})
.
- You can use
- 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 defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like
- 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 defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like
- 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 defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractDeploy as a sender like
- 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 defined the additional fields related to fee-delegation to sign TxTypeFeeDelegatedSmartContractExecution as a sender like
- Please refer to Klaytn Docs for more details.
- In
-
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 viacaver.kct
.- You can pass the sendOptions instead of deployerAddress with
caver.kct.kip7
likecaver.kct.kip7.deploy({…}, {from, feeDelegation, feePayer, feeRatio})
. - You can pass the sendOptions instead of deployerAddress with
caver.kct.kip17
likecaver.kct.kip17.deploy({…}, {from, feeDelegation, feePayer, feeRatio})
. - You can pass the sendOptions instead of deployerAddress with
caver.kct.ki37
likecaver.kct.kip37.deploy({…}, {from, feeDelegation, feePayer, feeRatio})
.
- You can pass the sendOptions instead of deployerAddress with
- 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
likekip7.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio})
. - You can use fee-delegation with methods of
caver.kct.kip17
likekip17.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio})
. - You can use fee-delegation with methods of
caver.kct.kip37
likekip37.methodName(arguments…, {from, feeDelegation, feePayer, feeRatio})
.
- You can use fee-delegation with methods of
- 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 likekip7.sign({from, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip7.sign
to sign TxTypeFeeDelegatedSmartContractDeploy likekip7.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip7.sign
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip7.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip7.sign
to sign TxTypeSmartContractExecution likekip7.sign({from, …}, functionName, arguments…)
. - You can use
kip7.sign
to sign TxTypeFeeDelegatedSmartContractExecution likekip7.sign({from, feeDelegation, …}, functionName, arguments…)
. - You can use
kip7.sign
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip7.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…)
. - You can use
kip17.sign
to sign TxTypeSmartContractDeploy likekip17.sign({from, …}, 'constructor', caver.kct.kip17.byteCode, arguments…)
. - You can use
kip17.sign
to sign TxTypeFeeDelegatedSmartContractDeploy likekip17.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip17.byteCode, arguments…)
. - You can use
kip17.sign
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip17.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip17.byteCode, arguments…)
. - You can use
kip17.sign
to sign TxTypeSmartContractExecution likekip17.sign({from, …}, functionName, arguments…)
. - You can use
kip17.sign
to sign TxTypeFeeDelegatedSmartContractExecution likekip17.sign({from, feeDelegation, …}, functionName, arguments…)
. - You can use
kip17.sign
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip17.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…)
. - You can use
kip37.sign
to sign TxTypeSmartContractDeploy likekip37.sign({from, …}, 'constructor', caver.kct.kip37.byteCode, arguments…)
. - You can use
kip37.sign
to sign TxTypeFeeDelegatedSmartContractDeploy likekip37.sign({from, feeDelegation, …}, 'constructor', caver.kct.kip37.byteCode, arguments…)
. - You can use
kip37.sign
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip37.sign({from, feeDelegation, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip37.sign
to sign TxTypeSmartContractExecution likekip37.sign({from, …}, functionName, arguments…)
. - You can use
kip37.sign
to sign TxTypeFeeDelegatedSmartContractExecution likekip37.sign({from, feeDelegation, …}, functionName, arguments…)
. - You can use
kip37.sign
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip37.sign({from, feeDelegation, feeRatio, …}, functionName, arguments…)
.
- You can use
- 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 likekip7.signAsFeePayer({from, feeDelegation, feePayer, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip7.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip7.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip7.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecution likekip7.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…)
. - You can use
kip7.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip7.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…)
. - You can use
kip17.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractDeploy likekip17.signAsFeePayer({from, feeDelegation, feePayer, …}, 'constructor', caver.kct.kip17.byteCode, arguments…)
. - You can use
kip17.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip17.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip17.byteCode, arguments…)
. - You can use
kip17.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecution likekip17.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…)
. - You can use
kip17.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip17.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…)
. - You can use
kip37.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractDeploy likekip37.signAsFeePayer({from, feePayer, feeDelegation, …}, 'constructor', caver.kct.kip37.byteCode, arguments…)
. - You can use
kip37.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractDeployWithRatio likekip37.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, 'constructor', caver.kct.kip7.byteCode, arguments…)
. - You can use
kip37.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecution likekip37.signAsFeePayer({from, feeDelegation, feePayer, …}, functionName, arguments…)
. - You can use
kip37.signAsFeePayer
to sign TxTypeFeeDelegatedSmartContractExecutionWithRatio likekip37.signAsFeePayer({from, feeDelegation, feePayer, feeRatio, …}, functionName, arguments…)
.
- You can use
- Please refer to Klaytn Docs for more details.
- You can pass sendOptions to