2021-06-08 17:25:48 +02:00
|
|
|
import { GAS_LIMITS } from '../../shared/constants/gas';
|
2020-11-07 08:38:12 +01:00
|
|
|
import {
|
|
|
|
TRANSACTION_STATUSES,
|
|
|
|
TRANSACTION_TYPES,
|
2021-03-16 22:00:08 +01:00
|
|
|
} from '../../shared/constants/transaction';
|
2020-11-07 08:38:12 +01:00
|
|
|
|
2020-01-09 04:34:58 +01:00
|
|
|
export const txMetaStub = {
|
2020-11-03 00:41:28 +01:00
|
|
|
firstRetryBlockNumber: '0x51a402',
|
|
|
|
hash: '0x2cc5a25744486f7383edebbf32003e5a66e18135799593d6b5cdd2bb43674f09',
|
|
|
|
history: [
|
2019-10-30 23:15:54 +01:00
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 405984854664302,
|
|
|
|
loadingDefaults: true,
|
2022-09-29 05:26:01 +02:00
|
|
|
metamaskNetworkId: '5',
|
2020-11-07 08:38:12 +01:00
|
|
|
status: TRANSACTION_STATUSES.UNAPPROVED,
|
2020-11-03 00:41:28 +01:00
|
|
|
time: 1572395156620,
|
2021-09-15 23:54:51 +02:00
|
|
|
type: TRANSACTION_TYPES.SIMPLE_SEND,
|
2020-11-03 00:41:28 +01:00
|
|
|
txParams: {
|
|
|
|
from: '0xf231d46dd78806e1dd93442cf33c7671f8538748',
|
2021-06-08 17:25:48 +02:00
|
|
|
gas: GAS_LIMITS.SIMPLE,
|
2020-11-03 00:41:28 +01:00
|
|
|
gasPrice: '0x1e8480',
|
|
|
|
to: '0xf231d46dd78806e1dd93442cf33c7671f8538748',
|
|
|
|
value: '0x0',
|
|
|
|
},
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
op: 'replace',
|
|
|
|
path: '/loadingDefaults',
|
|
|
|
timestamp: 1572395156645,
|
|
|
|
value: false,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: '#newUnapprovedTransaction - adding the origin',
|
|
|
|
op: 'add',
|
|
|
|
path: '/origin',
|
|
|
|
timestamp: 1572395156645,
|
|
|
|
value: 'MetaMask',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'txStateManager: setting status to approved',
|
|
|
|
op: 'replace',
|
|
|
|
path: '/status',
|
|
|
|
timestamp: 1572395158240,
|
2020-11-07 08:38:12 +01:00
|
|
|
value: TRANSACTION_STATUSES.APPROVED,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'transactions#approveTransaction',
|
|
|
|
op: 'add',
|
|
|
|
path: '/txParams/nonce',
|
|
|
|
timestamp: 1572395158261,
|
2022-09-29 05:26:01 +02:00
|
|
|
value: '0x5',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
op: 'add',
|
|
|
|
path: '/nonceDetails',
|
|
|
|
value: {
|
|
|
|
local: {
|
|
|
|
details: {
|
|
|
|
highest: 4,
|
|
|
|
startPoint: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
name: 'local',
|
|
|
|
nonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
network: {
|
|
|
|
details: {
|
|
|
|
baseCount: 4,
|
|
|
|
blockNumber: '0x51a401',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
name: 'network',
|
|
|
|
nonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
params: {
|
|
|
|
highestLocallyConfirmed: 0,
|
|
|
|
highestSuggested: 4,
|
|
|
|
nextNetworkNonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'transactions#signTransaction: add r, s, v values',
|
|
|
|
op: 'add',
|
|
|
|
path: '/r',
|
|
|
|
timestamp: 1572395158280,
|
|
|
|
value:
|
|
|
|
'0x5f973e540f2d3c2f06d3725a626b75247593cb36477187ae07ecfe0a4db3cf57',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
op: 'add',
|
|
|
|
path: '/s',
|
|
|
|
value:
|
|
|
|
'0x0259b52ee8c58baaa385fb05c3f96116e58de89bcc165cb3bfdfc708672fed8a',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
op: 'add',
|
|
|
|
path: '/v',
|
|
|
|
value: '0x2c',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'transactions#publishTransaction',
|
|
|
|
op: 'replace',
|
|
|
|
path: '/status',
|
|
|
|
timestamp: 1572395158281,
|
2020-11-07 08:38:12 +01:00
|
|
|
value: TRANSACTION_STATUSES.SIGNED,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
op: 'add',
|
|
|
|
path: '/rawTx',
|
|
|
|
value:
|
|
|
|
'0xf86204831e848082520894f231d46dd78806e1dd93442cf33c7671f853874880802ca05f973e540f2d3c2f06d3725a626b75247593cb36477187ae07ecfe0a4db3cf57a00259b52ee8c58baaa385fb05c3f96116e58de89bcc165cb3bfdfc708672fed8a',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'transactions#setTxHash',
|
|
|
|
op: 'add',
|
|
|
|
path: '/hash',
|
|
|
|
timestamp: 1572395158570,
|
|
|
|
value:
|
|
|
|
'0x2cc5a25744486f7383edebbf32003e5a66e18135799593d6b5cdd2bb43674f09',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'txStateManager - add submitted time stamp',
|
|
|
|
op: 'add',
|
|
|
|
path: '/submittedTime',
|
|
|
|
timestamp: 1572395158571,
|
|
|
|
value: 1572395158570,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'txStateManager: setting status to submitted',
|
|
|
|
op: 'replace',
|
|
|
|
path: '/status',
|
|
|
|
timestamp: 1572395158576,
|
2020-11-07 08:38:12 +01:00
|
|
|
value: TRANSACTION_STATUSES.SUBMITTED,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
2020-11-03 00:41:28 +01:00
|
|
|
note: 'transactions/pending-tx-tracker#event: tx:block-update',
|
|
|
|
op: 'add',
|
|
|
|
path: '/firstRetryBlockNumber',
|
|
|
|
timestamp: 1572395168972,
|
|
|
|
value: '0x51a402',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2020-11-03 00:41:28 +01:00
|
|
|
id: 405984854664302,
|
|
|
|
loadingDefaults: false,
|
2022-09-29 05:26:01 +02:00
|
|
|
metamaskNetworkId: '5',
|
2020-11-03 00:41:28 +01:00
|
|
|
nonceDetails: {
|
|
|
|
local: {
|
|
|
|
details: {
|
|
|
|
highest: 4,
|
|
|
|
startPoint: 4,
|
|
|
|
},
|
|
|
|
name: 'local',
|
|
|
|
nonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
network: {
|
|
|
|
details: {
|
|
|
|
baseCount: 4,
|
|
|
|
blockNumber: '0x51a401',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
name: 'network',
|
|
|
|
nonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
params: {
|
|
|
|
highestLocallyConfirmed: 0,
|
|
|
|
highestSuggested: 4,
|
|
|
|
nextNetworkNonce: 4,
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
origin: 'MetaMask',
|
|
|
|
r: '0x5f973e540f2d3c2f06d3725a626b75247593cb36477187ae07ecfe0a4db3cf57',
|
|
|
|
rawTx:
|
|
|
|
'0xf86204831e848082520894f231d46dd78806e1dd93442cf33c7671f853874880802ca05f973e540f2d3c2f06d3725a626b75247593cb36477187ae07ecfe0a4db3cf57a00259b52ee8c58baaa385fb05c3f96116e58de89bcc165cb3bfdfc708672fed8a',
|
|
|
|
s: '0x0259b52ee8c58baaa385fb05c3f96116e58de89bcc165cb3bfdfc708672fed8a',
|
2020-11-07 08:38:12 +01:00
|
|
|
status: TRANSACTION_STATUSES.SUBMITTED,
|
2020-11-03 00:41:28 +01:00
|
|
|
submittedTime: 1572395158570,
|
|
|
|
time: 1572395156620,
|
2021-09-15 23:54:51 +02:00
|
|
|
type: TRANSACTION_TYPES.SIMPLE_SEND,
|
2020-11-03 00:41:28 +01:00
|
|
|
txParams: {
|
|
|
|
from: '0xf231d46dd78806e1dd93442cf33c7671f8538748',
|
2021-06-08 17:25:48 +02:00
|
|
|
gas: GAS_LIMITS.SIMPLE,
|
2020-11-03 00:41:28 +01:00
|
|
|
gasPrice: '0x1e8480',
|
2022-09-29 05:26:01 +02:00
|
|
|
nonce: '0x5',
|
2020-11-03 00:41:28 +01:00
|
|
|
to: '0xf231d46dd78806e1dd93442cf33c7671f8538748',
|
|
|
|
value: '0x0',
|
2019-10-30 23:15:54 +01:00
|
|
|
},
|
2020-11-03 00:41:28 +01:00
|
|
|
v: '0x2c',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|