Examples
1.6.1 Simple Transfer Action
import { Action, TransferAction } from '@actions/sdk';
const donationAction: Action = {
title: "Donate ETH",
icon: "<https://example.com/eth-icon.png>",
description: "Support our project by donating 0.1 ETH",
label: "Donate Now",
links: [
{
type: "transfer-action",
label: "Donate 0.1 ETH",
address: {
type: "constant",
id: "projectAddress",
value: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
},
value: "100000000000000000", // 0.1 ETH in wei
success: {
message: "Thank you for your donation of 0.1 ETH!"
},
error: {
message: "Donation failed. Please ensure you have sufficient funds and try again."
}
} as TransferAction
],
error: {
message: "An error occurred while processing the donation. Please try again later."
}
};
1.6.2 Donation Action
1.6.3 Multi Transaction Action
1.6.4 NFT Sale Action
1.6.5 ERC-20 Payment Action
1.6.6 Native Token (ETH) Payment Action
Last updated