Cudos Blast Release v2.0.0
Release notes
Release v2.0.0 includes the following changes:
The release will include breaking changes. Guide how to migrate to v2.0.0 can be found below
Added:
- Ability to use
console.log
in JEST unit tests - Ability to handle future plugins install
options
object introducedbre
object introduced
Improved:
- Documentation Updated
- Improve contract deploying and instantiating
- Cudos-noded version update to latest - v1.0.0 mainnet release
- Project structure is improved
- Smart contract template is updated and improved
- Cosmswasm dependencies version updated
Migrate from v1 to v2
In order to migrate properly the following changes must be applied in all users scripts (test files, deployment scripts, etc)
getSigners()
is now unavailable in the global scope. It can be accessed throughbre
object. If a non-local network is used,getSigners()
now returns accounts from private-accounts.json
getSigners()
—>bre.getSigners()
getCustomSigners()
is removed. UsegetSigners()
instead.
const {account1: privateAccount1} = await getCustomSigners()
—>const [alice] = await bre.getSigners()
getContractFactory()
is now unavailable in the global scope and does not accept signer as parameter. The function is available inbre
object.
getContractFactory("myLabel", alice)
—>bre.getContractFactory("myLabel")
getContractFromAddress()
is now unavailable in the global scope and does not accept signer as parameter. The function is available inbre
object.
getContractFromAddress("cudos1uul3yzm2lgskp3dxpj0zg558hppxk6pt8t00qe", alice)
—>bre.getContractFromAddress("cudos1uul3yzm2lgskp3dxpj0zg558hppxk6pt8t00qe")
Contract object functions
- Contract object no longer saves deployer. Default signer is now always the first one returned by
getSigners()
. All functions that pass signer are affected by this change:deploy()
,execute()
,query()
- deploy function now introduces new parameter options instead of signer. The signer obeject can have the following fields:
options: {
signer: <signer>,
funds: <coins>,
}
contract.deploy()
: The way parameters are passed in changed,label
parameter is now mandatory andinitTx
in the returned object is renamed toinstantiateTx
const {initTx} = contract.deploy(msg, alice, "label", 123) —>
const {instantiateTx} = contract.deploy(msg, "label", { signer: alice, funds: 123})