Closed quiet-node closed 5 months ago
15 files + 2 74 suites +4 7m 22s :stopwatch: +28s 242 tests + 5 235 :heavy_check_mark: ± 0 6 :zzz: +4 1 :x: +1 252 runs +15 245 :heavy_check_mark: +10 6 :zzz: +4 1 :x: +1
For more details on these failures, see this check.
Results for commit 52baa6c4. ± Comparison against base commit a3178b5a.
:recycle: This comment has been updated with latest results.
Description: This pull request aims to update the existing dependencies to their latest versions and migrate all test suites from using
ethers.js@v5
toethers.js@v6
. Additional details can be found in issue#641.Tasks done:
Upgraded all dependencies to the latest versions
Migrated from ethersjs v5 to v6
Utility functions can now be accessed directly from the
ethers
object rather than theethers.utils
object.The
.address()
method has been replaced withawait .getAddress()
and the removal ofawait contract.deployed()
BaseContract
objects. The.address
attribute has been removed and replaced with the.getAddress() ⇒ Promise<string>
function which provides the resolved address of the contract.deployed()
has also been removed from theBaseContract
objectsThe
.getSighash(x)
method has been replaced with.getFunction(x).selector
.Interface
class no longer includes the.getSighash(x)
method. Instead,.getFunction(x).selector
is now in use.The
ethers.constants.AddressZero
has been replaced withethers.ZeroAddress
The
ethers.constants.HashZero
has been replaced withethers.ZeroHash
The
.events
object has been replaced with the.logs
object. Within thelogs
object, the.event
attribute is no longer used to store the name of the event; it has been replaced with thename
attribute in thefragment
object.One of the significant changes in version 6 is the replacement of the BigNumber class with the built-in ES2020 BigInt provided by modern JavaScript environments. Consequently, all BigNumber-related functions such as
.toNumber()
,.add()
,.sub()
,.div()
,.mod()
,.eq()
, etc., are now non-relevant and can be replaced with simple ES2020 BigInt operations.When a transaction is supposed to failed, the returned error object does not have
.reason
attribute equals totransaction failed
but instead the.code
attribute representsCALL_EXCEPTION
or the code-32008
When a transaction is reverted, the returned error object main reason is
CONTRACT_REVERT_EXECUTED_CODE
instead ofCALL_EXCEPTION
_signingKey()
object has been replaced withsigningKey
Methods operations
contract.callStatic.foo(args)
=>contract.foo.staticCall(args)
contract.staticCallResult.foo(addr)
=>contract.foo.staticCallResult(args)
contract.populateTransaction.foo(addr)
=>contract.foo.populateTransaction(args)
ethers.utils.splitSignature(signedData)
has been replaced withethers.Signature.from(signedData)
additions of multiple
await tx.wait()
which eventually wait until the transactions are completely done and the states have been completely written to mirror node before another request.hexZeroPad()
has been replaced with.zeroPadValue()
_signTypedData()
has been replaced with.signTypedData()
ethers.utils.defaultAbiCoder()
has been replaced withethers.AbiCoder.defaultAbiCoder()
.deployTransaction()
has been replaced with.deploymentTransaction()
solidityKeccak256()
has been replaced with.solidityPackedKeccak256()
formatBytes32String()
has been replaced with.encodeBytes32String()
arrayify()
has been replaced with.getBytes()
addition of
BigInt(x)
converter to convert int to BigIntRelated issue(s): #641
**Note: Upgrading dependencies to their latest versions includes transitioning from ethers.js v5.x to v6.x. It is essential to migrate the test suites from using ethers.js v5 to v6 within the same pull request.
Fixes #642 Fixes #550
Notes for reviewer:
Checklist