合约脚本编写
常用最简合约脚本demo:
FishxScript = {
name: "脚本名称",
desc: "脚本简介",
category: "脚本分组",
type: "contract",
url: "https://www.fishx.xyz/contract.html",
inputs: { amount: { type: "number", range: true } },
logic: async (context) => {
must(changeAccount);
await request({method: "wallet_switchEthereumChain",params: [{ chainId: 324 }],});
await send(
{
to:sender,
value:parseEther(getInput('amount',context)),
}
);
}
};此脚本解读:
合约脚本改写技巧:
简化:
内置变量或方法:
Last updated