Closed yenkhoon closed 3 months ago
Perhaps you could provide more detailed test cases or examples of your modified code to help us diagnose the issue. I noticed that "signAndSubmitTransaction" is not a method provided by the SDK. You can refer to the SDK's AptosCustomParam and createRawTransactionByABI to complete other formats of signing.
Perhaps you could provide more detailed test cases or examples of your modified code to help us diagnose the issue. I noticed that "signAndSubmitTransaction" is not a method provided by the SDK. You can refer to the SDK's AptosCustomParam and createRawTransactionByABI to complete other formats of signing.
Could you link me the url on these information?
currently the signandsubmit is using aptos library.
btw this is publish package txn there is no module data.
For other transaction like transfer, bondingcurve buy sell, it has no problem. Only publish package is having problem, I think you might wanna escalate this issue to the web3 wallet team on this, because upon publish package there is only 3 things needed (function, typeArugments and functionArguments). Prolly, the core web3 okx wallet doesn't allow typeArguments to be empty. @evieyee
Perhaps you could provide more detailed test cases or examples of your modified code to help us diagnose the issue. I noticed that "signAndSubmitTransaction" is not a method provided by the SDK. You can refer to the SDK's AptosCustomParam and createRawTransactionByABI to complete other formats of signing.
Could you link me the url on these information?
currently the signandsubmit is using aptos library.
Here's an example, see if you find it helpful here: https://github.com/okx/js-wallet-sdk/blob/main/packages/coin-aptos/tests/aptos.test.ts#L99
Perhaps you could provide more detailed test cases or examples of your modified code to help us diagnose the issue. I noticed that "signAndSubmitTransaction" is not a method provided by the SDK. You can refer to the SDK's AptosCustomParam and createRawTransactionByABI to complete other formats of signing.
Could you link me the url on these information? currently the signandsubmit is using aptos library.
Here's an example, see if you find it helpful here: https://github.com/okx/js-wallet-sdk/blob/main/packages/coin-aptos/tests/aptos.test.ts#L99
I have checked the test files, none of them suitable, we do not have abi. As this is a publish package txn as I mentioned earlier.
Here is a code reference that you can modify on your fork. You might see this update in the latest code in the future, but it is not mandatory! Thank you for your feedback.
export function publishPackagePayload(metadata: string | HexString, bytecode: string | HexString) {
let metadataBytes = metadata instanceof HexString ? metadata.toUint8Array() : hexToBytes(metadata)
let bytecodeBytes = bytecode instanceof HexString ? bytecode.toUint8Array() : hexToBytes(bytecode)
metadataBytes = BCS.bcsSerializeBytes(metadataBytes)
bytecodeBytes = BCS.serializeVectorWithFunc([bytecodeBytes], "serializeBytes");
return new TxnBuilderTypes.TransactionPayloadEntryFunction(
TxnBuilderTypes.EntryFunction.natural(
'0x1::code',
'publish_package_txn',
[],
[metadataBytes, bytecodeBytes],
),
);
}
test("buildRawTransaction with publishPackagePayload ", async () => {
const account = new AptosAccount(base.fromHex("privateKey"))
const sequenceNumber= 0
const chainId= 1
const maxGasAmount = 500000;
const gasUnitPrice = 100
const expirationTimestampSecs = 1723028868
const metadataHex = ""
const bytecodeHex = ""
const payload = publishPackagePayload(metadataHex,bytecodeHex)
let sender = account.address()
const rawTxn = createRawTransaction(
sender,
payload,
BigInt(sequenceNumber),
chainId,
BigInt(maxGasAmount),
BigInt(gasUnitPrice),
BigInt(expirationTimestampSecs))
const RawTx = generateBCSTransaction(account, rawTxn);
});
Perhaps you could provide more detailed test cases or examples of your modified code to help us diagnose the issue. I noticed that "signAndSubmitTransaction" is not a method provided by the SDK. You can refer to the SDK's AptosCustomParam and createRawTransactionByABI to complete other formats of signing.
Could you link me the url on these information? currently the signandsubmit is using aptos library.
Here's an example, see if you find it helpful here: https://github.com/okx/js-wallet-sdk/blob/main/packages/coin-aptos/tests/aptos.test.ts#L99
I have checked the test files, none of them suitable, we do not have abi. As this is a publish package txn as I mentioned earlier.
code snipplet