Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Cosmos js (#1680)
Browse files Browse the repository at this point in the history
* increase gas amplifier

* fix payload construction

handle payload atomic construction

* More accurate gas amplifier

* increase gas amplifier

* use same node for calculation and broadcast

* fix amount payload

* fix fees/gas calculation

* fix signature

fix public key when account is derivate

* fix fees regression

* More accurate pubkey selection

* don't use extra.tx_bytes

* fix pubkey selection

Co-authored-by: Alexandre Alouit <alexandre.alouit@gmail.com>
  • Loading branch information
wa-aal and alexalouit authored Feb 4, 2022
1 parent 5966437 commit 28408c6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/families/cosmos/api/Cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ export const getTransactions = async (address: string): Promise<any> => {
};

export const broadcast = async ({
signedOperation: { operation },
signedOperation: { operation, signature },
}): Promise<Operation> => {
const { data } = await network({
method: "POST",
// url: `${defaultEndpoint}/cosmos/tx/v1beta1/txs`, // FIXME LL-9159
url: `https://node.atomscan.com/cosmos/tx/v1beta1/txs`,
data: {
tx_bytes: operation.extra.tx_bytes,
tx_bytes: Array.from(Uint8Array.from(Buffer.from(signature, "hex"))),
mode: "BROADCAST_MODE_SYNC",
},
});
Expand Down
57 changes: 30 additions & 27 deletions src/families/cosmos/js-signOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,18 @@ const signOperation = ({

const accounts = await ledgerSigner.getAccounts();

let pubkey;

accounts.forEach((a) => {
if (a.address == account.freshAddress) {
pubkey = a.pubkey;
}
});

const unsignedPayload = await buildTransaction(
account,
transaction,
Buffer.from(accounts[0].pubkey).toString("hex")
Buffer.from(pubkey || null).toString("hex")
);

const msgs = unsignedPayload.messages.map((msg) =>
Expand All @@ -75,25 +83,22 @@ const signOperation = ({
// Cosmos API expects a different sorting, resulting in a separate signature.
// https://github.com/LedgerHQ/app-cosmos/blob/6c194daa28936e273f9548eabca9e72ba04bb632/app/src/tx_parser.c#L52

const { signature } = await ledgerSigner.signAmino(
account.freshAddress,
{
chain_id: chainId,
account_number: accountNumber.toString(),
sequence: sequence.toString(),
fee: {
amount: [
{
denom: account.currency.units[1].code,
amount: transaction.fees?.toString() as string,
},
],
gas: transaction.gas?.toString() as string,
},
msgs: msgs,
memo: transaction.memo || "",
}
);
const signed = await ledgerSigner.signAmino(account.freshAddress, {
chain_id: chainId,
account_number: accountNumber.toString(),
sequence: sequence.toString(),
fee: {
amount: [
{
denom: account.currency.units[1].code,
amount: transaction.fees?.toString() as string,
},
],
gas: transaction.gas?.toString() as string,
},
msgs: msgs,
memo: transaction.memo || "",
});

const txBodyFields: TxBodyEncodeObject = {
typeUrl: "/cosmos.tx.v1beta1.TxBody",
Expand All @@ -108,13 +113,13 @@ const signOperation = ({
bodyBytes: txBodyBytes,
authInfoBytes: unsignedPayload.auth,
signatures: [
new Uint8Array(Buffer.from(signature.signature, "base64")),
new Uint8Array(Buffer.from(signed.signature.signature, "base64")),
],
});

const tx_bytes = Array.from(
Uint8Array.from(TxRaw.encode(txRaw).finish())
);
const signature = Buffer.from(
Array.from(Uint8Array.from(TxRaw.encode(txRaw).finish()))
).toString("hex");

if (cancelled) {
return;
Expand All @@ -134,9 +139,7 @@ const signOperation = ({
type: "OUT",
value: transaction.amount,
fee: transaction.fees,
extra: {
tx_bytes: tx_bytes,
},
extra: {},
blockHash: null,
blockHeight: null,
senders,
Expand Down

1 comment on commit 28408c6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ 5 txs ($35.63) for Bot 'Cosmos JS'

⚠️ 2 mutations uncovered

5 mutation errors
all accounts sync in 1565ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 1: 0.25295 ATOM (8ops) (cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er on 44'/118'/0'/0/0) #0 js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er: (! sum of ops 0.260622 ATOM) 0.252952 ATOM spendable. 

max spendable ~0.25054
★ using mutation 'send some'
→ TO Cosmos 5: 0 ATOM (0ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:
✔️ transaction 
SEND  0.104537 ATOM
TO cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu

with fees=0.002406
  memo=LedgerLiveBot
STATUS (1198ms)
  amount: 0.104537 ATOM
  estimated fees: 0.002406 ATOM
  total spent: 0.106943 ATOM
✔️ has been signed! (2985ms) {"operation":{"id":"js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er:--OUT","hash":"","type":"OUT","senders":["cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er"],"recipients":["cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu"],"accountId":"js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:42:40.167Z","value":"104537","fee":"2406"},"signature":"0a92010a8f010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126f0a2d636f736d6f73317a707674686533707876796a65377672637176326d36716532716775307238676b7a36346572122d636f736d6f73316d766b33667778676466616334796a6d676c3968647a303535357138676c6a79647a766a74751a0f0a057561746f6d120631303435333712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21039e06365acbce5b7331f2867591be377de688057b75a42241d564046dec36f9c312040a02087f180812130a0d0a057561746f6d12043234303610ccef051a40c48b41d256386c0a720c29217525041023cdc79f4ec485cc1b2e16634a679e6b789d04c5ececc4270affaca307c7fe61cbce7901fcaac699cde0e311defc727b","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (749173), sequence (8) and chain-id (cosmoshub-4): unauthorized')

Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (749173), sequence (8) and chain-id (cosmoshub-4): unauthorized')
all accounts sync in 1510ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 2: 0.4162 ATOM (7ops) (cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv on 44'/118'/1'/0/0) #1 js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv: (! sum of ops 0.441363 ATOM) 0.189658 ATOM spendable. 0.22655 ATOM delegated. 
DELEGATIONS
  to cosmosvaloper1rcp29q3hpd246n6qak7jluqep4v006cdsc2kkl 0.087313 ATOM 
  to cosmosvaloper16qme5yxucnaj6snx35nmwze0wyxr8wfgqxsqfw 0.024038 ATOM 
  to cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08 0.004641 ATOM 
  to cosmosvaloper1x8rr4hcf54nz6hfckyy2n05sxss54h8wz9puzg 0.017993 ATOM 
  to cosmosvaloper1gjtvly9lel6zskvwtvlg5vhwpu9c9waw7sxzwx 0.00761 ATOM 
  to cosmosvaloper1wlagucxdxvsmvj6330864x8q3vxz4x02rmvmsu 0.061104 ATOM 
  to cosmosvaloper1rpgtz9pskr5geavkjz02caqmeep7cwwpv73axj 0.012531 ATOM 
  to cosmosvaloper146kwpzhmleafmhtaxulfptyhnvwxzlvm87hwnm 0.01132 ATOM 
  to cosmosvaloper1cgh5ksjwy2sd407lyre4l3uj2fdrqhpkzp06e6 0.025155 ATOM 

max spendable ~0.18755
★ using mutation 'undelegate'
✔️ transaction 
UNDELEGATE 
TO 
  0.00185 -> cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08
with fees=0.005932
  memo=LedgerLiveBot
STATUS (470ms)
  amount: 0 ATOM
  estimated fees: 0.005932 ATOM
  total spent: 0.005932 ATOM
✔️ has been signed! (2540ms) {"operation":{"id":"js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv:--OUT","hash":"","type":"OUT","senders":["cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv"],"recipients":[""],"accountId":"js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:42:47.408Z","value":"0","fee":"5932"},"signature":"0aa0010a9d010a252f636f736d6f732e7374616b696e672e763162657461312e4d7367556e64656c656761746512740a2d636f736d6f73317a643065386a396739777572387570376a35617161687a32333372346a6d7671687966666e761234636f736d6f7376616c6f70657231737878396d737a766530676165647a356c643771646b6a6b6676387a393932617836396b30381a0d0a057561746f6d12043138353012670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210209c9aee1c560942170326ee9b3e1d38853c7b36c15995672f43a1ff4a11dceaa12040a02087f180412130a0d0a057561746f6d12043539333210c8bd0e1a40b7d54e8ccac170b953958f346c392aa202db12f7d2b52aa79d801d2472aca6a50cacbfb6a24fd930f6e7a494045eadbf77bede3a43da172b7a4902753dc08219","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (751172), sequence (4) and chain-id (cosmoshub-4): unauthorized')

Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (751172), sequence (4) and chain-id (cosmoshub-4): unauthorized')
all accounts sync in 1715ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 3: 0.3595 ATOM (4ops) (cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0 on 44'/118'/2'/0/0) #2 js:2:cosmos:cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0: 0.35957 ATOM spendable. 

max spendable ~0.3571
★ using mutation 'send max'
→ TO Cosmos 5: 0 ATOM (0ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:
✔️ transaction 
SEND MAX
TO cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu

with fees=0.002406
STATUS (1235ms)
  amount: 0.357164 ATOM
  estimated fees: 0.002406 ATOM
  total spent: 0.35957 ATOM
✔️ has been signed! (2633ms) 
✔️ broadcasted! (91ms) optimistic operation: 
  -0.102734 ATOM     OUT        0A58ED60FB8BB0CF9701211410483DE27260154D63F23E4AD1BBDBB518EC2BC9 2022-02-04T10:42
(final state reached in 33.2s)
⚠️ Error: expect(received).toBe(expected) // Object.is equality

Expected: "0"
Received: "254430"

Error: expect(received).toBe(expected) // Object.is equality

Expected: "0"
Received: "254430"
all accounts sync in 781ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 4: 0.29906 ATOM (4ops) (cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n on 44'/118'/3'/0/0) #3 js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n: 0.299061 ATOM spendable. 

max spendable ~0.29665
★ using mutation 'delegate new validators'
✔️ transaction 
DELEGATE 
TO 
  0.005548 -> cosmosvaloper12w6tynmjzq4l8zdla3v4x0jt8lt4rcz5gk7zg2
  0.086454 -> cosmosvaloper1hvsdf03tl6w5pnfvfv5g8uphjd4wfw2h4gvnl7
  0.046106 -> cosmosvaloper1ddle9tczl87gsvmeva3c48nenyng4n56nghmjk
with fees=0.009293
  memo=LedgerLiveBot
STATUS (1150ms)
  amount: 0.138108 ATOM
  estimated fees: 0.009293 ATOM
  total spent: 0.147401 ATOM
✔️ has been signed! (3.7s) {"operation":{"id":"js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n:--OUT","hash":"","type":"OUT","senders":["cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n"],"recipients":[""],"accountId":"js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:43:37.263Z","value":"0","fee":"9293"},"signature":"0adc030a9b010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512740a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723132773674796e6d6a7a71346c387a646c6133763478306a74386c743472637a35676b377a67321a0d0a057561746f6d1204353534380a9c010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512750a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723168767364663033746c367735706e667666763567387570686a643477667732683467766e6c371a0e0a057561746f6d120538363435340a9c010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512750a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723164646c653974637a6c38376773766d657661336334386e656e796e67346e35366e67686d6a6b1a0e0a057561746f6d1205343631303612670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21037b14abc40458ff33a77f2e6462ac78eae4a7148b872153bf5aa92d3134b586e212040a02087f180212130a0d0a057561746f6d12043932393310e2d7161a40263e9a7a9a060e89b2bf3b9330414131f29714702be450ed080c59537f0f99e70f33135500366a5c6a3bcab261a3606c18cb8518ded6b8c47fe36b282cafff4f","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (754002), sequence (2) and chain-id (cosmoshub-4): unauthorized')

Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (754002), sequence (2) and chain-id (cosmoshub-4): unauthorized')
all accounts sync in 558ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 5: 0.10273 ATOM (1ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu: 0.102734 ATOM spendable. 

max spendable ~0.10011
★ using mutation 'send some'
→ TO Cosmos 3: 0.25443 ATOM (5ops) (cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0 on 44'/118'/2'/0/0) #2 js:2:cosmos:cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0:
✔️ transaction 
SEND  0.046451 ATOM
TO cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0

with fees=0.002365
  memo=LedgerLiveBot
STATUS (1903ms)
  amount: 0.046451 ATOM
  estimated fees: 0.002365 ATOM
  total spent: 0.048816 ATOM
✔️ has been signed! (2852ms) {"operation":{"id":"js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:--OUT","hash":"","type":"OUT","senders":["cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu"],"recipients":["cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0"],"accountId":"js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:43:45.220Z","value":"46451","fee":"2365"},"signature":"0a91010a8e010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126e0a2d636f736d6f73316d766b33667778676466616334796a6d676c3968647a303535357138676c6a79647a766a7475122d636f736d6f7331757479356e663238656d656168756864673972756e6d7a756c757139756a3575656b346a6b301a0e0a057561746f6d1205343634353112650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210359687bed2cbc7bf99b59127bd2b598be1419160ab7c3ca4ff385a37032a62f2812040a02087f12130a0d0a057561746f6d12043233363510f7e2051a4086e5afc44489daa613b9c9ceb41afc870b4887e30593f15fc6dfc5caf06e05f02abd7ac34757bca105cb084389ba8b6bfe8d63972879e199db322d32b574f6a3","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (779120), sequence (0) and chain-id (cosmoshub-4): unauthorized')

Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (779120), sequence (0) and chain-id (cosmoshub-4): unauthorized')
Details of the 5 mutations

Spec Cosmos (5)

Spec Cosmos found 5 Cosmos accounts (preload: 239ms). Will use Cosmos 2.18.0 on nanoS 2.0.0-rc5
(583ms) Cosmos 1: 0.25295 ATOM (8ops) (cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er on 44'/118'/0'/0/0) #0 js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er:
(390ms) Cosmos 2: 0.18965 ATOM (7ops) (cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv on 44'/118'/1'/0/0) #1 js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv:
(367ms) Cosmos 3: 0.3595 ATOM (4ops) (cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0 on 44'/118'/2'/0/0) #2 js:2:cosmos:cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0:
(443ms) Cosmos 4: 0.29906 ATOM (4ops) (cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n on 44'/118'/3'/0/0) #3 js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n:
(1565ms) Cosmos 5: 0 ATOM (0ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:
all accounts sync in 1565ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 1: 0.25295 ATOM (8ops) (cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er on 44'/118'/0'/0/0) #0 js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er: (! sum of ops 0.260622 ATOM) 0.252952 ATOM spendable. 

max spendable ~0.25054
★ using mutation 'send some'
→ TO Cosmos 5: 0 ATOM (0ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:
✔️ transaction 
SEND  0.104537 ATOM
TO cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu

with fees=0.002406
  memo=LedgerLiveBot
STATUS (1198ms)
  amount: 0.104537 ATOM
  estimated fees: 0.002406 ATOM
  total spent: 0.106943 ATOM
✔️ has been signed! (2985ms) {"operation":{"id":"js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er:--OUT","hash":"","type":"OUT","senders":["cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er"],"recipients":["cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu"],"accountId":"js:2:cosmos:cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:42:40.167Z","value":"104537","fee":"2406"},"signature":"0a92010a8f010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126f0a2d636f736d6f73317a707674686533707876796a65377672637176326d36716532716775307238676b7a36346572122d636f736d6f73316d766b33667778676466616334796a6d676c3968647a303535357138676c6a79647a766a74751a0f0a057561746f6d120631303435333712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21039e06365acbce5b7331f2867591be377de688057b75a42241d564046dec36f9c312040a02087f180812130a0d0a057561746f6d12043234303610ccef051a40c48b41d256386c0a720c29217525041023cdc79f4ec485cc1b2e16634a679e6b789d04c5ececc4270affaca307c7fe61cbce7901fcaac699cde0e311defc727b","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (749173), sequence (8) and chain-id (cosmoshub-4): unauthorized')

all accounts sync in 1510ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 2: 0.4162 ATOM (7ops) (cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv on 44'/118'/1'/0/0) #1 js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv: (! sum of ops 0.441363 ATOM) 0.189658 ATOM spendable. 0.22655 ATOM delegated. 
DELEGATIONS
  to cosmosvaloper1rcp29q3hpd246n6qak7jluqep4v006cdsc2kkl 0.087313 ATOM 
  to cosmosvaloper16qme5yxucnaj6snx35nmwze0wyxr8wfgqxsqfw 0.024038 ATOM 
  to cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08 0.004641 ATOM 
  to cosmosvaloper1x8rr4hcf54nz6hfckyy2n05sxss54h8wz9puzg 0.017993 ATOM 
  to cosmosvaloper1gjtvly9lel6zskvwtvlg5vhwpu9c9waw7sxzwx 0.00761 ATOM 
  to cosmosvaloper1wlagucxdxvsmvj6330864x8q3vxz4x02rmvmsu 0.061104 ATOM 
  to cosmosvaloper1rpgtz9pskr5geavkjz02caqmeep7cwwpv73axj 0.012531 ATOM 
  to cosmosvaloper146kwpzhmleafmhtaxulfptyhnvwxzlvm87hwnm 0.01132 ATOM 
  to cosmosvaloper1cgh5ksjwy2sd407lyre4l3uj2fdrqhpkzp06e6 0.025155 ATOM 

max spendable ~0.18755
★ using mutation 'undelegate'
✔️ transaction 
UNDELEGATE 
TO 
  0.00185 -> cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08
with fees=0.005932
  memo=LedgerLiveBot
STATUS (470ms)
  amount: 0 ATOM
  estimated fees: 0.005932 ATOM
  total spent: 0.005932 ATOM
✔️ has been signed! (2540ms) {"operation":{"id":"js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv:--OUT","hash":"","type":"OUT","senders":["cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv"],"recipients":[""],"accountId":"js:2:cosmos:cosmos1zd0e8j9g9wur8up7j5aqahz233r4jmvqhyffnv:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:42:47.408Z","value":"0","fee":"5932"},"signature":"0aa0010a9d010a252f636f736d6f732e7374616b696e672e763162657461312e4d7367556e64656c656761746512740a2d636f736d6f73317a643065386a396739777572387570376a35617161687a32333372346a6d7671687966666e761234636f736d6f7376616c6f70657231737878396d737a766530676165647a356c643771646b6a6b6676387a393932617836396b30381a0d0a057561746f6d12043138353012670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210209c9aee1c560942170326ee9b3e1d38853c7b36c15995672f43a1ff4a11dceaa12040a02087f180412130a0d0a057561746f6d12043539333210c8bd0e1a40b7d54e8ccac170b953958f346c392aa202db12f7d2b52aa79d801d2472aca6a50cacbfb6a24fd930f6e7a494045eadbf77bede3a43da172b7a4902753dc08219","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (751172), sequence (4) and chain-id (cosmoshub-4): unauthorized')

all accounts sync in 1715ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 3: 0.3595 ATOM (4ops) (cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0 on 44'/118'/2'/0/0) #2 js:2:cosmos:cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0: 0.35957 ATOM spendable. 

max spendable ~0.3571
★ using mutation 'send max'
→ TO Cosmos 5: 0 ATOM (0ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:
✔️ transaction 
SEND MAX
TO cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu

with fees=0.002406
STATUS (1235ms)
  amount: 0.357164 ATOM
  estimated fees: 0.002406 ATOM
  total spent: 0.35957 ATOM
✔️ has been signed! (2633ms) 
✔️ broadcasted! (91ms) optimistic operation: 
  -0.102734 ATOM     OUT        0A58ED60FB8BB0CF9701211410483DE27260154D63F23E4AD1BBDBB518EC2BC9 2022-02-04T10:42
(final state reached in 33.2s)
⚠️ Error: expect(received).toBe(expected) // Object.is equality

Expected: "0"
Received: "254430"

all accounts sync in 781ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 4: 0.29906 ATOM (4ops) (cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n on 44'/118'/3'/0/0) #3 js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n: 0.299061 ATOM spendable. 

max spendable ~0.29665
★ using mutation 'delegate new validators'
✔️ transaction 
DELEGATE 
TO 
  0.005548 -> cosmosvaloper12w6tynmjzq4l8zdla3v4x0jt8lt4rcz5gk7zg2
  0.086454 -> cosmosvaloper1hvsdf03tl6w5pnfvfv5g8uphjd4wfw2h4gvnl7
  0.046106 -> cosmosvaloper1ddle9tczl87gsvmeva3c48nenyng4n56nghmjk
with fees=0.009293
  memo=LedgerLiveBot
STATUS (1150ms)
  amount: 0.138108 ATOM
  estimated fees: 0.009293 ATOM
  total spent: 0.147401 ATOM
✔️ has been signed! (3.7s) {"operation":{"id":"js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n:--OUT","hash":"","type":"OUT","senders":["cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n"],"recipients":[""],"accountId":"js:2:cosmos:cosmos1ccemcd8p3r293e5rcv0awaj9hfnn6wmxkz520n:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:43:37.263Z","value":"0","fee":"9293"},"signature":"0adc030a9b010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512740a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723132773674796e6d6a7a71346c387a646c6133763478306a74386c743472637a35676b377a67321a0d0a057561746f6d1204353534380a9c010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512750a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723168767364663033746c367735706e667666763567387570686a643477667732683467766e6c371a0e0a057561746f6d120538363435340a9c010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512750a2d636f736d6f73316363656d6364387033723239336535726376306177616a3968666e6e36776d786b7a3532306e1234636f736d6f7376616c6f7065723164646c653974637a6c38376773766d657661336334386e656e796e67346e35366e67686d6a6b1a0e0a057561746f6d1205343631303612670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21037b14abc40458ff33a77f2e6462ac78eae4a7148b872153bf5aa92d3134b586e212040a02087f180212130a0d0a057561746f6d12043932393310e2d7161a40263e9a7a9a060e89b2bf3b9330414131f29714702be450ed080c59537f0f99e70f33135500366a5c6a3bcab261a3606c18cb8518ded6b8c47fe36b282cafff4f","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (754002), sequence (2) and chain-id (cosmoshub-4): unauthorized')

all accounts sync in 558ms
▬ Cosmos 2.18.0 on nanoS 2.0.0-rc5
→ FROM Cosmos 5: 0.10273 ATOM (1ops) (cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu on 44'/118'/4'/0/0) #4 js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu: 0.102734 ATOM spendable. 

max spendable ~0.10011
★ using mutation 'send some'
→ TO Cosmos 3: 0.25443 ATOM (5ops) (cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0 on 44'/118'/2'/0/0) #2 js:2:cosmos:cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0:
✔️ transaction 
SEND  0.046451 ATOM
TO cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0

with fees=0.002365
  memo=LedgerLiveBot
STATUS (1903ms)
  amount: 0.046451 ATOM
  estimated fees: 0.002365 ATOM
  total spent: 0.048816 ATOM
✔️ has been signed! (2852ms) {"operation":{"id":"js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:--OUT","hash":"","type":"OUT","senders":["cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu"],"recipients":["cosmos1uty5nf28emeahuhdg9runmzuluq9uj5uek4jk0"],"accountId":"js:2:cosmos:cosmos1mvk3fwxgdfac4yjmgl9hdz0555q8gljydzvjtu:","blockHash":null,"blockHeight":null,"extra":{},"date":"2022-02-04T10:43:45.220Z","value":"46451","fee":"2365"},"signature":"0a91010a8e010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126e0a2d636f736d6f73316d766b33667778676466616334796a6d676c3968647a303535357138676c6a79647a766a7475122d636f736d6f7331757479356e663238656d656168756864673972756e6d7a756c757139756a3575656b346a6b301a0e0a057561746f6d1205343634353112650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a210359687bed2cbc7bf99b59127bd2b598be1419160ab7c3ca4ff385a37032a62f2812040a02087f12130a0d0a057561746f6d12043233363510f7e2051a4086e5afc44489daa613b9c9ceb41afc870b4887e30593f15fc6dfc5caf06e05f02abd7ac34757bca105cb084389ba8b6bfe8d63972879e199db322d32b574f6a3","expirationDate":null}
⚠️ Error: invalid broadcast return (code: 4, message: 'signature verification failed; please verify account number (779120), sequence (0) and chain-id (cosmoshub-4): unauthorized')


Details of the 2 uncovered mutations

Spec Cosmos (2)

  • redelegate:
  • claim rewards:

Portfolio ($35.63)

Details of the 1 currencies
Spec (accounts) Operations Balance funds?
Cosmos (4) 25 (+2) 1.1012 ATOM (- 0.002406) ($35.63) ⚠️ cosmos1zpvthe3pxvyje7vrcqv2m6qe2qgu0r8gkz64er

Please sign in to comment.