Comment on page
ASA Opt-in
First, identify the index number of the asset to opt-in to.
USDC | Explorer | Asset Index |
Testnet | 10458941 | |
Mainnet | 31566704 |
Add an item to the Whitelisted Actions by clicking the ➕. An example entry is below.


The following transaction creates a zero amount asset transfer ("axfer"). Both, the sender and the recipient are the account that will be the signer of this transaction.
const transactionBody = {
from: signingAccount.chainAccount,
to: signingAccount.chainAccount,
assetIndex: 10458941, // USDC Testnet Asset Index
amount: 0,
type: "axfer"
};
Oreid-js will take care of the final transaction formatting. Pass in the transactionBody from above. Along with the other values needed to prepare a transaction object.
const transaction = await oreId.createTransaction({
chainAccount: signingAccount.chainAccount,
chainNetwork: signingAccount.chainNetwork,
transaction: transactionBody,
signOptions: {
broadcast: true,
returnSignedTransaction: false,
},
});
git clone https://github.com/TeamAikon/oreid.git
cd examples/_algorand/react/asaOptIn
yarn install
yarn start
Last modified 1yr ago