This website tracks page views and other usage statistics. No personal information is collected.
Skip to main content

Release 17.12.2024: migration guide

This release of =nil; simplifies working with contract ABIs when using the =nil; CLI. It also adjusts function signatures inside the SmartAccount.sol contract. The receipt type inside Nil.js now contains the receipt flags which should help in identifying various types of transactions.

Summary of key changes

  • If a contract is registered inside the Cometa service, the =nil; CLI can now automatically retrieve its ABI when using the contract call-readonly, contract estimate-fee, contract send-external-transaction, smart-account deploy, smart-account call-readonly, smart-account estimate-fee, and smart-account send-transaction commands
  • The simpleAsyncCall() function inside the SmartAccount.sol contract has been renamed back to asyncCall()
  • The overload of the simpleAsyncCall() function that allowed for setting feeCredit has been removed from the SmartAccount.sol contract
  • An issue preventing eth_estimateFee from outputting the correct result has been resolved
  • The IReceipt type in Nil.js now contains the flags array. The Flag objects in this array show the type of the transaction for which a specific receipt was recorded

Migration of smart contracts

  • Use the asyncCall() function inside SmartAccount.sol instead of simpleAsyncCall()

The simpleAsyncCall() function inside SmartAccount.sol has been renamed to asyncCall().

One additional overload of simpleAsyncCall() has also been removed from SmartAccount.sol. This overload allowed for setting the feeCredit argument when sending an async call. The overload was deemed unnecessary as the existing implementation of asyncCall() already has this functionality and feeCredit can be forwarded with external transactions.

Migration of =nil; CLI commands

  • Use the compact versions of the call-readonly, send-external-transaction, estimate-fee, and send-transaction commands

After a contract is registered with the Cometa service, the =nil; CLI will be able to acquire its ABI automatically whenever this contract is called using the commands described above. In this case, there will be no need to specify the --abi flag with these commands.

Migration of Nil.js scripts

  • Access the new flags array inside transaction receipts

Receipts returned by Nil.js now contain the flags array which holds objects describing the type of the transaction whose receipts is being read. The available types of flags include:

"Internal" | "External" | "Deploy" | "Refund" | "Bounce" | "Response";

This change should make it easier to differentiate between different transactions based on their receipts.

Migration of Hardhat scripts and tasks

No specific changes have to be made to existing Hardhat scripts and tasks.