Release notes
Last updated
Was this helpful?
Last updated
Was this helpful?
Support conflux-rust v2.4.0 new RPC methods
(https://github.com/Conflux-Chain/conflux-rust/blob/master/changelogs/JSONRPC.md#v240) cfx_feeHistory
, cfx_maxPriorityFeePerGas
etc.
Support Conflux 2930 and 1559 type transactions, will auto detect the transaction type and use the right method to sign the transaction. Default is 1559 type.
The transaction now has a new field type
which can be 0
, 1
or 2
, 0
is legacy type, 1
is 2930 type 2
is 1559 type.
The 2930 type transaction will have a new field accessList
which is an array of address
and storageKeys
pairs.
The 1559 type transaction will have a new field maxPriorityFeePerGas
and maxFeePerGas
.
Both cfx_call, and cfx_estimateGasAndCollateral have also been updated to support 1559 type transactions.
Transaction's receipt have three new fields type
, burntGasFee
, effectiveGasPrice
Block have a new field baseFeePerGas
Conflux
class constructor parameters do not support defaultGasRatio
, defaultStorageRatio
anymore, because the estimation of gas and storage collateral is very accurate now.
Add three debug RPC method in cfx
namespace debug_getTransactionsByBlock
, debug_getEpochReceiptProofByTransaction
, debug_getTransactionsByEpoch
Add filter related RPC method in cfx namespace cfx_newFilter
, cfx_newBlockFilter
, cfx_newPendingTransactionFilter
, cfx_getFilterChanges
, cfx_getFilterLogs
, cfx_uninstallFilter
Add pos_getAccountByPowAddress
, pos_getConsensusBlocks
, pos_getEpochState
, pos_getLedgerInfoByEpoch
, pos_getLedgerInfoByBlockNumber
, pos_getLedgerInfoByEpochAndRound
, pos_getLedgerInfosByEpoch
in pos
namespace
Add trace method trace_epoch
in trace
namespace
Support new scheme for epoch parameter like EIP-1898, check details , supported methods are: cfx_getBalance
, cfx_getCode
, cfx_call
, cfx_getNextNonce
, cfx_getStorageAt
Add cfx_getCollateralInfo
RPC method which was import from conflux-rust v2.3.0
SponsorInfo
add two more fields availableStoragePoint
and usedStoragePoint
Optimize the gas and storageCollateral logic of transaction population.
Add support the new InternalContract ParamsControl
Remove cfx_getLogs
filter's field offset
and limit
Add support for new RPC cfx_getParamsFromVote
Update typescript datatype definitions
Add more jsdoc comment to generate ts d.ts
files
Move cfx
related formatters (block, transaction, receipt, log and etc) to independent file ./src/rpc/types/formmatter.js
.
Fix logFilter formater bug
Fix contract method batch call bug
Change trace epochNumber
, transactionPosition
from BigInt to Int
Add field totalEspaceTokens
in getSupplyInfo
's response
Add support for PoS RPC methods
Split RPC methods to it's own namespace, currently include: cfx
, pos
, trace
, txpool
Add support for batch RPC
Browser export class name change from Conflux to TreeGraph
Add method getNextUsableNonce
to conflux.advanced
, which will first try to use txpool_nextNonce
to get a usable nonce, if failed it will fall back to cfx_getNextNonce
Add three internal contracts CrossSpaceCall
, ConfluxContext
, PoSRegister
Add one method cfxMappedEVMSpaceAddress
to address
utility.
Add a new boolean field valid
to indicate whether this trace has change state
The internal_transfer_action
type trace has added four new field fromPocket
, toPocket
, fromSpace
, toSpace
The call
and create
type trace has added one new field space
Add a new provider WechatProvider
which can be used in Wechat environment
Add balance
key in the result of estimateGasAndCollateralAdvance
as the balance of options.from
.
Add method checkBalanceAgainstTransaction
, and estimateGasAndCollateralAdvance
to better estimate gas and check balance.
Add blockNumber
to block related methods cfx_getBlockByHash
, cfx_getBlockByEpochNumber
, cfx_getBlockByHashWithPivotAssumption
which need Conflux-rust v1.1.5
or above.
Add one new RPC method cfx_getBlockByBlockNubmer
format.bytes
now only support hex string, will not accept non hex utf-8 string
Add cli cfxjs
which can random generate a 0x1 prefix ethereum
address
Conflux
add a new method getEpochReceiptsByPivotBlockHash
Support keepAlive
option in Conflux
initialization.
Add one util method tracesInTree
to return a tree structure traces.
Fix contract method override bug.
Add a address utility method shortenCfxAddress
.
Support retry
option in Conflux
initialization.
Add pending transaction status enum CONST.PENDING_TX_STATUS
currently have two value: FUTURE_NONCE
NOT_ENOUGH_CASH
Optimize the address convert performance.
Conflux
add method getAccountPendingTransactions
to get one account's pending transaction.
Split API documents into several files, which is easy to read.
format.address
will respect networkId
, verbose
flag even if the first parameter is an CIP37 address.
Add support for a standard token contract through Conflux.CRC20
cfx_getLogs
filter option add one more field offset
Add one RPC method cfx_getAccountPendingInfo
to get account's transaction pending info
epochs
pubsub now accept one parameter subscription_epoch
the supported values are latest_mined
(default) and latest_state
Include blockHash
, epochHash
, epochNumber
, transactionHash
, and transactionPosition
for trace RPCs
When ABI encoding bytes-N
type, if the data's length is not enough, will auto pad (right) to N
getStatus
method rethurn three new fields latestState
, latestConfirmed
, latestCheckpoint
add two trace
related rpc traceTransaction
, traceFilter
add one debug rpc getEpochReceipts
add two provider wrapper wrapEthereum
, wrapConflux
to work with metamask
Notice: this is an update corresponding conflux-rust v1.1.2
Conflux
's option can pass networkId
now, and add a new method updateNetworkId
to sync networkId from RPC.
format.address
will return new CIP37 addresses, if you pass a hex address, networkId
should also be passed as second parameter
add new method format.hexAddress
to format hex address
Wallet's constructor add a parameter networkId
PrivateKeyAccount constructor
, decrypt
, random
need one more parameter networkId
Transaction
, Message
sign
method need one more parameter networkId
Conflux's get methods will return new address, and same to contract method returned address.
getSupplyInfo
response add new field totalCirculating
getStatus
response add new field networkId
Add RPC method traceBlock
to Conflux
which can used to get block's execution trace
export Contract
add stateMutability
for method from abi
rename EventLog.params to EventLog.arguments
add subscribeLogs
for EventLog
contract decode constructor data with out bytecode
add conflux.getSupplyInfo
WebsocketProvider with Websocket options
add conflux.getVoteList
add conflux.getDepositList
update conflux.getTransactionReceipt
fix: update request id avoid repeat
fix: use native websocket for front-end
use BigInt for nodejs, JSBI for browser
fix: EventCoder, FunctionCoder, valueCoder decode return string but not JSBI
add defaultGasRatio
and defaultStorageRatio
add BaseAccount
and PrivateKeyAccount
Account signTransaction
and signMessage
to be async
add wallet
wallet use for create and manage Account
by address
wallet use for sendTransaction
add Subscription
add internal contract
add checksum address
providerFactory
only accept first argument as override options
add batch request
add WebSocketProvider
BaseProvider instanceof EventEmitter
add CONST
export format
and sign
without util
add Drip
to replace unit
for input, use Drip.fromXXX
to get drip number string
include all method from conflux JSON_RPC document
friendly example code
example will guide user to use SDK step by step
charming code organization
split abi coder with types
split contract method, event and override
rename send_transaction
to cfx_sendTransaction
Account.encrypt returned address drop '0x' prefix
use scrypt-js
RPC returned all number as hex
fix sendTransaction
, call
, estimateGasAndCollateral
shallow copy options
Account.decrypt
required keystoreV3 object as input, and put password
as second parameter
Account.prototype.encrypt
returned keystoreV3 format object
epochNumber accept earliest
, latest_checkpoint
, latest_confirmed
label
add getAdmin
sendTransaction accept privateKey as from
create Account accept address
defaultGasPrice, only use for sendTransaction
remove defaultEpoch, defaultChainId, defaultGas, defaultStorageLimit
fix broken sourcemap
fix: include crypto into browserify build
add format.bytes
add contract method & event type or signature indexes
add getStatus
remove getRiskCoefficient
and replace with getConfirmationRiskByHash
remove getAccount
cause it's internal RPC.
use require
replace import
to gen code.
add defaultStorageLimit and defaultChainId for Conflux
abi implicitly converting string to number
solidity method: function add(uint,uint) public returns (uint);
format nonce as JSBI.BigInt
format transaction fields
unit return string
contract fields "code" rename to "bytecode"
abi decodeData and decodeLog return object
For detail explanation of the trace updates check .
Check for change details
Add provider.request
to make provider compliant with
Here is the complete Conflux-rust v2.0
This version is corresponding to conflux-rust v1.1.3, check it's for detailed info.