Migrating from Scrypto v0.5 to v0.6

Most of the changes introduced in Scrypto v0.6 was to make it work with Alphanet. This means that nothing much changed in the Scrypto syntax. In fact, one of the only changes you will notice is a small update to the way you write transaction manifests.

Removed CALL_METHOD_WITH_ALL_RESOURCES instruction

This CALL_METHOD_WITH_ALL_RESOURCES that was most often used to empty the worktop and send its content back into an account so that no resources is left and forgotten, was removed. There is now a clearer way of doing that exact thing. Here is an example:

CALL_METHOD ComponentAddress("[your_address]") "deposit_batch" Expression("ENTIRE_WORKTOP");

Notice that there is now a single instruction to call methods (CALL_METHOD). If you want to create a vector containing all the resources present on the worktop, and send it as an argument, you can use the Expression("ENTIRE_WORKTOP") call.

If you need it, you can also create a vector containing all the proofs present on the AuthZone with the following expression: Expression("ENTIRE_AUTH_ZONE")

Changed PUBLISH_PACKAGE arguments

In previous versions, you used to provide a single parameter to the PUBLISH_PACKAGE instruction consisting of the whole compiled package binary. You now have to provide two parameters. The first one is a Blob representing the compiled binary and the second is a Blob representing the abi file. You would then provide the .wasm and .abi files along with the signed transaction when submitting it to the network.

This is some complicated low-level stuff. If you want to publish a package on the Alphanet we recommend using this publishing tool where you upload both files and the transaction intent is automatically built.

Added CREATE_RESOURCE instructions

You can now create fungible resources using the transaction manifest with the new CREATE_RESOURCE instruction. For example, you can create a simple fungible resource with a divisibility of 18 and an initial supply of 1000 like this:

CREATE_RESOURCE Enum("Fungible", 18u8) Map<String, String>("name", "My Token", "symbol", "TKN") Map<Enum, Tuple>(Enum("Withdraw"), Tuple(Enum("AllowAll"), Enum("LOCKED"))) Some(Enum("Fungible", Decimal("1000")));

Added BURN_BUCKET instruction

You can now burn bucket directly from the transaction manifest with the BURN_BUCKET Bucket("name") instruction.

Added MINT_FUNGIBLE instruction

After putting the required proof on the AuthZone, you can call the MINT_FUNGIBLE instruction to mint more tokens of a particular resource:

MINT_FUNGIBLE ResourceAddress("[resource_address]") Decimal("[amount]") ;