Skip to content

Commit

Permalink
test(construction-preprocess): transaction size with multiple operations
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasBustamante authored and AlanVerbner committed Dec 11, 2020
1 parent 0309ee4 commit 04d3b79
Showing 1 changed file with 122 additions and 1 deletion.
123 changes: 122 additions & 1 deletion cardano-rosetta-server/test/e2e/fixture-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,127 @@ export const CONSTRUCTION_PAYLOADS_WITH_TWO_WITHDRAWALS = {
}
};

export const CONSTRUCTION_PAYLOADS_WITH_TWO_WITHDRAWALS = {
network_identifier: {
blockchain: 'cardano',
network: 'mainnet'
},
operations: [
{
operation_identifier: {
index: 0,
network_index: 0
},
type: operationType.INPUT,
status: 'success',
account: {
address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx'
},
amount: {
value: '-90000',
currency: {
symbol: 'ADA',
decimals: 6
}
},
coin_change: {
coin_identifier: {
// eslint-disable-next-line sonarjs/no-duplicate-string
identifier: '2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f:1'
},
coin_action: 'coin_spent'
}
},
{
operation_identifier: {
index: 1
},
related_operations: [
{
index: 0
}
],
type: operationType.OUTPUT,
status: 'success',
account: {
address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx'
},
amount: {
value: '10000',
currency: {
symbol: 'ADA',
decimals: 6
}
}
},
{
operation_identifier: {
index: 2
},
related_operations: [
{
index: 0
}
],
type: operationType.OUTPUT,
status: 'success',
account: {
address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx'
},
amount: {
value: '40000',
currency: {
symbol: 'ADA',
decimals: 6
}
}
},
{
operation_identifier: {
index: 3
},
type: operationType.WITHDRAWAL,
status: 'success',
amount: {
value: '10000',
currency: {
symbol: 'ADA',
decimals: 6
}
},
metadata: {
staking_credential: {
hex_bytes: '1B400D60AAF34EAF6DCBAB9BBA46001A23497886CF11066F7846933D30E5AD3F',
curve_type: 'edwards25519'
}
}
},
{
operation_identifier: {
index: 4
},
type: operationType.WITHDRAWAL,
status: 'success',
amount: {
value: '10000',
currency: {
symbol: 'ADA',
decimals: 6
}
},
metadata: {
staking_credential: {
hex_bytes: '31fc9813a71d8db12a4f2e3382ab0671005665b70d0cd1a9fb6c4a4e9ceabc90',
curve_type: 'edwards25519'
}
}
}
],
metadata: {
ttl: 1000
}
};

export const CONSTRUCTION_PAYLOADS_WITH_STAKE_KEY_REGISTRATION_AND_WITHDRAWAL = {
network_identifier: {
blockchain: 'cardano',
Expand Down Expand Up @@ -1404,7 +1525,7 @@ export const CONSTRUCTION_PAYLOADS_WITH_STAKE_KEY_REGISTRATION_AND_WITHDRAWAL =
},
{
operation_identifier: {
index: 3
index: 4
},
type: operationType.WITHDRAWAL,
status: 'success',
Expand Down

0 comments on commit 04d3b79

Please sign in to comment.