@@ -84,7 +84,7 @@ export const PASSING_TEST_TRANSACTIONS: TestTransaction[] = [
84
84
} ,
85
85
]
86
86
87
- const failTransaction : Transaction = {
87
+ const bridgeTx : Transaction = {
88
88
chainId : 42161 ,
89
89
from : '0xa99f898530df1514a566f1a6562d62809e99557d' ,
90
90
input :
@@ -93,36 +93,33 @@ const failTransaction: Transaction = {
93
93
value : '0' ,
94
94
}
95
95
96
+ export const controlTransaction : TestTransaction = {
97
+ transaction : bridgeTx ,
98
+ destinationChainId : 5000 ,
99
+ amount : 10000000n ,
100
+ tokenAddress : '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' ,
101
+ recipient : '0xa99f898530df1514a566f1a6562d62809e99557d' ,
102
+ description : 'when all parameters are correctly set' ,
103
+ }
104
+
96
105
export const FAILING_TEST_TRANSACTIONS : TestTransaction [ ] = [
97
106
{
98
- transaction : failTransaction ,
107
+ ... controlTransaction ,
99
108
destinationChainId : 10 , // 5000
100
- amount : 10000000n ,
101
- tokenAddress : '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' ,
102
- recipient : '0xa99f898530df1514a566f1a6562d62809e99557d' ,
103
109
description : 'when destination chain is incorrect' ,
104
110
} ,
105
111
{
106
- transaction : failTransaction ,
107
- destinationChainId : 5000 ,
112
+ ...controlTransaction ,
108
113
amount : 20000000n , // 10000000n
109
- tokenAddress : '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' ,
110
- recipient : '0xa99f898530df1514a566f1a6562d62809e99557d' ,
111
114
description : 'when amount is insufficient' ,
112
115
} ,
113
116
{
114
- transaction : failTransaction ,
115
- destinationChainId : 5000 ,
116
- amount : 10000000n ,
117
+ ...controlTransaction ,
117
118
tokenAddress : '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' , // wrong USDC token
118
- recipient : '0xa99f898530df1514a566f1a6562d62809e99557d' ,
119
119
description : 'when input token is incorrect' ,
120
120
} ,
121
121
{
122
- transaction : failTransaction ,
123
- destinationChainId : 5000 ,
124
- amount : 10000000n ,
125
- tokenAddress : '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' ,
122
+ ...controlTransaction ,
126
123
recipient : '0xB7e98B3F16CC915B9C7a321c1bd95fa406BDbabe' ,
127
124
description : 'when recipient is incorrect' ,
128
125
} ,
0 commit comments