Skip to content

Instantly share code, notes, and snippets.

private async buildSignAndSubmitBCS(account: Account, func: string, args: any[]): Promise<UserTransactionResponse> {
const parts = func.split("::");
const moduleAddress = parts[0];
const moduleName = parts[1];
const functionName = parts[2];
const chainId = await this.getChainId(); // locally cached chainId
const sequenceNumber = BigInt(0); // 0 for orderless transactions
const entryFunction = new EntryFunction(
new ModuleId(AccountAddress.from(moduleAddress), new Identifier(moduleName)),