Skip to content

Commit bd8067a

Browse files
authored
[scriptComposer] Fix Example Code Error (#957)
* Update script-composer.mdx * Update zh script-composer.mdx
1 parent 9197b9c commit bd8067a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/nextra/pages/en/build/sdks/ts-sdk/building-transactions/script-composer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const transaction = await aptos.transaction.build.scriptComposer({
2727
// invoke 0x1::coin::withdraw. This function would return a value of a `coin` type.
2828
const coin = await builder.addBatchedCalls({
2929
function: "0x1::coin::withdraw",
30-
functionArguments: [CallArgument.new_signer(0), 1],
30+
functionArguments: [CallArgument.newSigner(0), 1],
3131
typeArguments: ["0x1::aptos_coin::AptosCoin"],
3232
});
3333

apps/nextra/pages/zh/build/sdks/ts-sdk/building-transactions/script-composer.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const transaction = await aptos.transaction.build.scriptComposer({
2727
// 调用 0x1::coin::withdraw,该函数会返回一个 `coin` 类型的值
2828
const coin = await builder.addBatchedCalls({
2929
function: "0x1::coin::withdraw",
30-
functionArguments: [CallArgument.new_signer(0), 1],
30+
functionArguments: [CallArgument.newSigner(0), 1],
3131
typeArguments: ["0x1::aptos_coin::AptosCoin"],
3232
});
3333

@@ -57,4 +57,4 @@ const transaction = await aptos.transaction.build.scriptComposer({
5757
b. 如果返回值不具备 Copy 能力,则该返回值只能传递给后续调用一次
5858
2. 调用者需要确保将正确的值作为参数传递给后续调用。在前述示例中,`0x1::coin::coin_to_fungible_asset` 函数需要接收一个 `Coin<AptosCoin>` 类型的参数。
5959

60-
这实现了 [AIP-102](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-102.md) 规范
60+
这实现了 [AIP-102](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-102.md) 规范

0 commit comments

Comments
 (0)