How to initialize a fungible store for a Fungible asset via TypeScript? #64
Answered
by
gregnazario
gregnazario
asked this question in
Questions
-
From unbound on Discord: Can I have something in typescript that allows the signer on the frontend to quickly initialize a fungiblestore for them of a certain metadata? |
Beta Was this translation helpful? Give feedback.
Answered by
gregnazario
Mar 13, 2024
Replies: 1 comment 3 replies
-
You can call Additionally, const metadataAddress = "0x12345";
const recipientAddress = "0x1337";
const amount = 0;
const txn = await aptos.transaction.build.simple({
sender: account.accountAddress,
data: {
function: "0x1::primary_fungible_store::transfer",
typeArguments: ["0x1::object::ObjectCore"],
functionArguments: [metadataAddress, recipientAddress, amount],
}
}); Does that answer your question, or are you looking for something else? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
gregnazario
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can call
0x1::primary_fungible_store::create_primary_store
if you're looking for a fungible asset, but it's not an entry function on it's own.Additionally,
0x1::primary_fungible_store::transfer
will create the primary fungible store, similar to coin.Does that answer…