Closed glachac closed 5 years ago
@perfectmak
transferCoins is broken again. The result shows the following error:
LibraTransactionResponse {
signedTransaction: LibraSignedTransaction {
transaction: LibraTransaction {
program: [Object],
gasContraint: [Object],
expirationTime: [BigNumber],
sendersAddress: [AccountAddress],
sequenceNumber: [BigNumber]
},
publicKey: Uint8Array [
126, 142, 165, 73, 194, 136, 153, 77,
213, 61, 211, 220, 2, 180, 195, 48,
128, 186, 113, 104, 203, 53, 60, 113,
224, 54, 74, 205, 207, 172, 13, 60
],
signature: Uint8Array [
52, 197, 179, 236, 142, 5, 10, 23, 179, 135, 58,
132, 85, 225, 203, 155, 158, 211, 37, 180, 36, 148,
176, 27, 29, 35, 74, 68, 239, 57, 78, 51, 94,
211, 86, 119, 146, 62, 195, 39, 168, 161, 46, 83,
205, 146, 67, 37, 9, 97, 243, 229, 13, 49, 27,
81, 8, 251, 190, 24, 60, 213, 197, 14
]
},
validatorId: Uint8Array [],
acStatus: -1,
mempoolStatus: -1,
vmStatus: LibraVMStatusError {
errorType: 1,
validationStatusError: { code: 11, message: 'none' },
verificationStatusErrors: undefined,
invariantViolationError: undefined,
deserializationError: undefined,
executionError: undefined
}
}
transferCoins is broken again. The result shows the following error:
Yes. That's a different problem than the one this PR fixes.
transferCoins is broken again. The result shows the following error:
Yes. That's a different problem than the one this PR fixes.
Are you sure. If I follow the example of transferring coins:
async function main() {
const client = new LibraClient({ network: LibraNetwork.Testnet });
const wallet = new LibraWallet({
mnemonic:
'lend arm arm addict trust release grid unlock exhibit surround deliver front link bean night dry tuna pledge expect net ankle process mammal great',
});
const account = wallet.newAccount();
const account2Address = '854563c50d20788fb6c11fac1010b553d722edb0c02f87c2edbdd3923726d13f';
const response = await client.transferCoins(account, account2Address, 1e6);
// wait for transaction confirmation
await response.awaitConfirmation(client);
}
await main();
I still get the same error:
LibraTransactionResponse {
signedTransaction: LibraSignedTransaction {
transaction: LibraTransaction {
program: [Object],
gasContraint: [Object],
expirationTime: [BigNumber],
sendersAddress: [AccountAddress],
sequenceNumber: [BigNumber]
},
publicKey: Uint8Array [
47, 155, 39, 237, 105, 229, 232, 59,
212, 95, 232, 170, 218, 168, 201, 155,
3, 136, 206, 105, 210, 2, 62, 97,
145, 158, 172, 92, 188, 114, 18, 215
],
signature: Uint8Array [
149, 121, 124, 84, 180, 14, 217, 148, 75, 129, 216,
144, 4, 192, 233, 44, 242, 248, 128, 114, 223, 62,
248, 126, 254, 183, 103, 211, 161, 223, 222, 191, 232,
150, 253, 232, 86, 216, 236, 88, 93, 108, 146, 220,
139, 47, 2, 232, 231, 37, 87, 20, 43, 212, 224,
205, 223, 153, 240, 89, 150, 148, 13, 10
]
},
validatorId: Uint8Array [],
acStatus: -1,
mempoolStatus: -1,
vmStatus: LibraVMStatusError {
errorType: 1,
validationStatusError: { code: 11, message: 'none' },
verificationStatusErrors: undefined,
invariantViolationError: undefined,
deserializationError: undefined,
executionError: undefined
}
}
It also seems that no libra-core based wallet is functioning right now for transferring coins. Including kulap-libra poc
Yes, I'm sure, since this PR is limited in scope.
This PR only fixes the getAccountTransaction() issue, not the transferCoins(). The testnet update broke three things in this library, getAccountState(), getAccountTransaction(), and transferCoins(). I have submitted PR's to fix the first two, but not transferCoins().
They are all related to each other in the sense that the testnet change caused all three issues, but the fixes are in separate places. I'm not sure how to fix the transferCoins() issue.
Closing this PR. See PR #46 which combines all the fixes into one PR including transfer coin
…the protobuf definition change since address and path are no longer parameters
This fixes the issue reported in #41