Release notes

v2.4.0

  • 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.

v2.3.0

  • 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 here, supported methods are: cfx_getBalance, cfx_getCode, cfx_call, cfx_getNextNonce, cfx_getStorageAt

v2.1.11

  • Add cfx_getCollateralInfo RPC method which was import from conflux-rust v2.3.0

  • SponsorInfo add two more fields availableStoragePoint and usedStoragePoint

v2.1.7

  • Optimize the gas and storageCollateral logic of transaction population.

v2.1.5

  • 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

v2.1.0

  • 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.

v2.0.7

  • Fix logFilter formater bug

v2.0.6

  • Fix contract method batch call bug

v2.0.3

  • Change trace epochNumber, transactionPosition from BigInt to Int

  • Add field totalEspaceTokens in getSupplyInfo's response

v2.0.0

  • 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.

trace updates

  • 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

For detail explanation of the trace updates check this doc.

Check v2.0 changes for change details

Provider API

  • Add provider.request to make provider compliant with EIP-1193

  • Add a new provider WechatProvider which can be used in Wechat environment

Here is the complete Conflux-rust v2.0 RPC change overview

v1.7.2

  • Add balance key in the result of estimateGasAndCollateralAdvance as the balance of options.from.

v1.7.1

  • Add method checkBalanceAgainstTransaction, and estimateGasAndCollateralAdvance to better estimate gas and check balance.

v1.6.15

  • 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

v1.6.10

  • 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

v1.6.9

  • 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.

v1.6.3

  • Support retry option in Conflux initialization.

  • Add pending transaction status enum CONST.PENDING_TX_STATUS currently have two value: FUTURE_NONCE NOT_ENOUGH_CASH

v1.6.2

  • Optimize the address convert performance.

v1.6.1

  • Conflux add method getAccountPendingTransactions to get one account's pending transaction.

  • Split API documents into several files, which is easy to read.

v1.6.0

This version is corresponding to conflux-rust v1.1.3, check it's changelog for detailed info.

  • 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

v1.5.13

  • 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

v1.5.10

  • 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

v1.1.7

  • Add RPC method traceBlock to Conflux which can used to get block's execution trace

v1.1.6

  • export Contract

v1.1.5

  • add stateMutability for method from abi

  • rename EventLog.params to EventLog.arguments

  • add subscribeLogs for EventLog

  • contract decode constructor data with out bytecode

v1.1.4

  • add conflux.getSupplyInfo

v1.1.3

  • WebsocketProvider with Websocket options

v1.1.2

  • add conflux.getVoteList

  • add conflux.getDepositList

  • update conflux.getTransactionReceipt

v1.1.1

fix: update request id avoid repeat

v1.1.0

fix: use native websocket for front-end

  • use BigInt for nodejs, JSBI for browser

v1.0.1

fix: EventCoder, FunctionCoder, valueCoder decode return string but not JSBI

v1.0.0

  • 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

JSON_RPC

  • 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

v0.13.4

  • rename send_transaction to cfx_sendTransaction

v0.13.3

  • Account.encrypt returned address drop '0x' prefix

v0.13.2

  • use scrypt-js

v0.13.1

  • RPC returned all number as hex

  • fix sendTransaction, call, estimateGasAndCollateral shallow copy options

v0.13.0

  • 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

v0.12.0

  • add getAdmin

  • sendTransaction accept privateKey as from

  • create Account accept address

v0.11.0

  • defaultGasPrice, only use for sendTransaction

  • remove defaultEpoch, defaultChainId, defaultGas, defaultStorageLimit

v0.10.3

  • fix broken sourcemap

v0.10.2

  • fix: include crypto into browserify build

v0.10.1

  • add format.bytes

  • add contract method & event type or signature indexes

v0.10.0-alpha

  • add getStatus

  • remove getRiskCoefficient and replace with getConfirmationRiskByHash

  • remove getAccount cause it's internal RPC.

  • use require replace import to gen code.

v0.9.2

  • add defaultStorageLimit and defaultChainId for Conflux

v0.9.1

  • abi implicitly converting string to number

solidity method: function add(uint,uint) public returns (uint);

v0.9.0-beta

  • format nonce as JSBI.BigInt

  • format transaction fields

  • unit return string

  • contract fields "code" rename to "bytecode"

  • abi decodeData and decodeLog return object

Last updated

Was this helpful?