帮助我使 solana 交易更快
`async sendSplTransaction(钱包,{to,值,mintAddress,小数,费用}){
constrecipientPubKey = new PublicKey(to);
const mintPubKey = new PublicKey(mintAddress);
const bigValue = this.convertToBigInt(值, 小数);
constcentrecentBlockhash = 等待 this.provider.connection.getLatestBlockhash();
让 currentBlockheight = 等待 this.provider.connection.getBlockHeight();
const { blockhash } = 等待 this.provider.connection.getLatestBlockhash();
常量 MAX_RETRIES = 3;
让重试次数 = 0;
while (retryCount setTimeout(resolve, delay)); } else { return { success: false, data: null, error: error.message }; } } } return { success: false, data: null, error: 'Transaction retries exhausted.' }; }`
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3