The current api-contract
documentation is very outdated. We are working on updating it as we speak.
The createBlueprint
is no longer available. You can use CodePromise
to upload and instantiate new code and BlueprintPromise
to instantiate code that is already on-chain.
The 2 classes respectively map to the instantiate_with_code
and instantiate
dispatchables in the Substrate FRAME contracts pallet
In both cases you would instantiate by calling tx[constructorName]
on the resulting object (code or blueprint) with the right arguments.
You can read more about the arguments in the metadata section
and also refer to the implementation in Polkadot.js Apps for Blueprint and Code.