-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: Updated code to use the latest version of Sui SDK.
- Loading branch information
Showing
11 changed files
with
110 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
import { TransactionBlock } from '@mysten/sui.js/transactions' | ||
import { Transaction } from '@mysten/sui/transactions' | ||
import { fullFunctionName } from '~~/helpers/greeting/misc' | ||
|
||
export const prepareCreateGreetingTransaction = ( | ||
packageId: string | ||
): TransactionBlock => { | ||
const txb = new TransactionBlock() | ||
txb.moveCall({ | ||
): Transaction => { | ||
const tx = new Transaction() | ||
tx.moveCall({ | ||
arguments: [], | ||
target: fullFunctionName(packageId, 'create'), | ||
}) | ||
|
||
return txb | ||
return tx | ||
} | ||
|
||
export const prepareSetGreetingTransaction = ( | ||
packageId: string, | ||
objectId: string, | ||
name: string | ||
): TransactionBlock => { | ||
const txb = new TransactionBlock() | ||
txb.moveCall({ | ||
arguments: [txb.object(objectId), txb.pure.string(name), txb.object('0x8')], | ||
): Transaction => { | ||
const tx = new Transaction() | ||
tx.moveCall({ | ||
arguments: [tx.object(objectId), tx.pure.string(name), tx.object('0x8')], | ||
target: fullFunctionName(packageId, 'set_greeting'), | ||
}) | ||
|
||
return txb | ||
return tx | ||
} | ||
|
||
export const prepareResetGreetingTransaction = ( | ||
packageId: string, | ||
objectId: string | ||
): TransactionBlock => { | ||
const txb = new TransactionBlock() | ||
txb.moveCall({ | ||
arguments: [txb.object(objectId)], | ||
): Transaction => { | ||
const tx = new Transaction() | ||
tx.moveCall({ | ||
arguments: [tx.object(objectId)], | ||
target: fullFunctionName(packageId, 'reset_greeting'), | ||
}) | ||
|
||
return txb | ||
return tx | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.