Skip to content

Commit

Permalink
Update script-composer.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
runtian-zhou authored Nov 22, 2024
1 parent 1336380 commit b54df82
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: "Dynamically invoke chains of Move calls with ScriptComposer"

# Dynamically invoke chains of Move calls with ScriptComposer

This is so far an **expermiental** feature that is only released to [this particular](https://www.npmjs.com/package/@aptos-labs/ts-sdk/v/1.33.0-sc.0) version of typescript SDK.

In the naive api, you only get to specify one entry function to invoke for one transaction. An advanced builder might want to be able to invoke multiple **public** Move functions inside one transaction. This is now enabled by the new `scriptComposer` api provided in the transaction builder.

Here's an example how you can invoke the api:
Expand Down Expand Up @@ -46,4 +48,4 @@ Behind the scene, the SDK will invoke a WASM binary to compile the series of Mov
b. If returned value does not have Copy ability, the returned value can only be passed to subsequent calls once.
2. The caller will need to make sure they pass the right values as arguments to subsequent calls. In the previous example, `0x1::coin::coin_to_fungible_asset` will expect an argument of `Coin<AptosCoin>`.

This implements [AIP-102](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-102.md)
This implements [AIP-102](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-102.md)

0 comments on commit b54df82

Please sign in to comment.