tapimo 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +6064 -4829
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +1 -0
- package/dist/App.js.map +1 -1
- package/dist/Webhooks.js +2 -2
- package/dist/Webhooks.js.map +1 -1
- package/dist/admin/App.d.ts +1008 -917
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +48 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -1
- package/dist/admin/apps/earn-vaults.js +2 -1
- package/dist/admin/apps/earn-vaults.js.map +1 -1
- package/dist/admin/apps/organizations.d.ts +92 -3
- package/dist/admin/apps/organizations.d.ts.map +1 -1
- package/dist/admin/apps/organizations.js +69 -7
- package/dist/admin/apps/organizations.js.map +1 -1
- package/dist/admin/apps/verified-tokens.d.ts +74 -74
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.js +69 -69
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/apps/Zones.d.ts +12 -12
- package/dist/apps/Zones.js +3 -3
- package/dist/apps/data/App.d.ts +2909 -2523
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +11 -6
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +22 -22
- package/dist/apps/data/routes/earn.d.ts +183 -7
- package/dist/apps/data/routes/earn.d.ts.map +1 -1
- package/dist/apps/data/routes/earn.js +434 -75
- package/dist/apps/data/routes/earn.js.map +1 -1
- package/dist/apps/data/routes/exchanges.d.ts +15 -0
- package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
- package/dist/apps/data/routes/exchanges.js +180 -114
- package/dist/apps/data/routes/exchanges.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +18 -19
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +93 -93
- package/dist/apps/data/routes/transfers.d.ts +12 -12
- package/dist/apps/data/routes/valuation.d.ts +30 -30
- package/dist/apps/data/routes/verified-tokens.d.ts +5 -5
- package/dist/apps/data/routes/webhooks.d.ts +805 -102
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +47 -5
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/funding/App.d.ts +456 -45
- package/dist/apps/funding/App.d.ts.map +1 -1
- package/dist/apps/funding/App.js +1 -1
- package/dist/apps/funding/App.js.map +1 -1
- package/dist/apps/funding/routes/deposit-addresses.d.ts +17 -17
- package/dist/apps/funding/routes/deposit-addresses.d.ts.map +1 -1
- package/dist/apps/funding/routes/deposit-addresses.js +1 -1
- package/dist/apps/funding/routes/deposit-addresses.js.map +1 -1
- package/dist/apps/funding/routes/transfers.d.ts +654 -73
- package/dist/apps/funding/routes/transfers.d.ts.map +1 -1
- package/dist/apps/funding/routes/transfers.js +211 -5
- package/dist/apps/funding/routes/transfers.js.map +1 -1
- package/dist/apps/management/App.d.ts +831 -387
- package/dist/apps/management/App.d.ts.map +1 -1
- package/dist/apps/management/Billing.d.ts +1 -1
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +17 -1
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/routes/api-keys.d.ts +76 -76
- package/dist/apps/management/routes/billing.d.ts +76 -76
- package/dist/apps/management/routes/faucet.d.ts +12 -12
- package/dist/apps/management/routes/invitations.d.ts +24 -24
- package/dist/apps/management/routes/invite-links.d.ts +46 -46
- package/dist/apps/management/routes/members.d.ts +46 -46
- package/dist/apps/management/routes/orgs.d.ts +20 -20
- package/dist/apps/management/routes/projects.d.ts +44 -44
- package/dist/apps/management/routes/usage.d.ts +32 -32
- package/dist/apps/management/routes/verified-token-requests.d.ts +16 -16
- package/dist/apps/management/routes/webhooks.d.ts +707 -57
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +21 -21
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +115 -23
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +27 -1
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +22 -0
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +8 -3
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +16 -1
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/fundingTransferTransactions.d.ts +38 -0
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +1 -1
- package/dist/db/tables/fundingTransferTransactions.js +44 -3
- package/dist/db/tables/fundingTransferTransactions.js.map +1 -1
- package/dist/db/tables/fundingTransfers.d.ts +17 -0
- package/dist/db/tables/fundingTransfers.d.ts.map +1 -1
- package/dist/db/tables/fundingTransfers.js +21 -0
- package/dist/db/tables/fundingTransfers.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +24 -0
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +27 -0
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +25 -1
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +26 -0
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/sponsoredTransactions.d.ts +44 -0
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +146 -13
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +10 -6
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +9 -6
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/internal/EarnVaults.js +5 -5
- package/dist/internal/EarnVaults.js.map +1 -1
- package/dist/internal/Log.d.ts +1 -1
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/Viem.d.ts +16 -1
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +12 -2
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/funding/DepositWebhook.d.ts.map +1 -1
- package/dist/internal/funding/DepositWebhook.js +2 -1
- package/dist/internal/funding/DepositWebhook.js.map +1 -1
- package/dist/internal/funding/Evidence.d.ts.map +1 -1
- package/dist/internal/funding/Evidence.js +2 -10
- package/dist/internal/funding/Evidence.js.map +1 -1
- package/dist/internal/funding/Provider.d.ts +40 -0
- package/dist/internal/funding/Provider.d.ts.map +1 -1
- package/dist/internal/funding/Provider.js +5 -0
- package/dist/internal/funding/Provider.js.map +1 -1
- package/dist/internal/funding/SourceObservation.d.ts.map +1 -1
- package/dist/internal/funding/SourceObservation.js +5 -7
- package/dist/internal/funding/SourceObservation.js.map +1 -1
- package/dist/internal/funding/Transfer.d.ts +101 -6
- package/dist/internal/funding/Transfer.d.ts.map +1 -1
- package/dist/internal/funding/Transfer.js +162 -34
- package/dist/internal/funding/Transfer.js.map +1 -1
- package/dist/internal/funding/TransferReconciliation.d.ts +52 -0
- package/dist/internal/funding/TransferReconciliation.d.ts.map +1 -0
- package/dist/internal/funding/TransferReconciliation.js +192 -0
- package/dist/internal/funding/TransferReconciliation.js.map +1 -0
- package/dist/internal/funding/TransferWebhook.d.ts +21 -0
- package/dist/internal/funding/TransferWebhook.d.ts.map +1 -0
- package/dist/internal/funding/TransferWebhook.js +43 -0
- package/dist/internal/funding/TransferWebhook.js.map +1 -0
- package/dist/internal/funding/index.d.ts +1 -0
- package/dist/internal/funding/index.d.ts.map +1 -1
- package/dist/internal/funding/index.js +1 -0
- package/dist/internal/funding/index.js.map +1 -1
- package/dist/internal/funding/providers/relay.d.ts.map +1 -1
- package/dist/internal/funding/providers/relay.js +3 -12
- package/dist/internal/funding/providers/relay.js.map +1 -1
- package/dist/internal/funding/providers/stargate.d.ts +99 -0
- package/dist/internal/funding/providers/stargate.d.ts.map +1 -1
- package/dist/internal/funding/providers/stargate.js +337 -35
- package/dist/internal/funding/providers/stargate.js.map +1 -1
- package/dist/internal/webhookDestinations/slack.d.ts.map +1 -1
- package/dist/internal/webhookDestinations/slack.js +16 -0
- package/dist/internal/webhookDestinations/slack.js.map +1 -1
- package/package.json +1 -1
- package/src/App.ts +1 -0
- package/src/Client.test-d.ts +83 -2
- package/src/Webhooks.ts +2 -2
- package/src/admin/apps/earn-vaults.ts +2 -1
- package/src/admin/apps/organizations.test.ts +53 -1
- package/src/admin/apps/organizations.ts +90 -5
- package/src/admin/ui/src/lib/organizations.test.ts +112 -1
- package/src/admin/ui/src/lib/organizations.ts +55 -0
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +116 -0
- package/src/admin/ui.generated.ts +69 -69
- package/src/apps/Zones.test.ts +3 -3
- package/src/apps/Zones.ts +3 -3
- package/src/apps/composition.test.ts +1 -0
- package/src/apps/data/App.ts +15 -6
- package/src/apps/data/routes/earn.test.ts +369 -14
- package/src/apps/data/routes/earn.ts +548 -79
- package/src/apps/data/routes/exchanges.test.ts +740 -15
- package/src/apps/data/routes/exchanges.ts +954 -753
- package/src/apps/data/routes/fee-amm.ts +17 -18
- package/src/apps/data/routes/webhooks.test.ts +21 -5
- package/src/apps/data/routes/webhooks.ts +63 -8
- package/src/apps/funding/App.ts +12 -2
- package/src/apps/funding/routes/deposit-addresses.test.ts +4 -4
- package/src/apps/funding/routes/deposit-addresses.ts +2 -2
- package/src/apps/funding/routes/transfers.test.ts +510 -19
- package/src/apps/funding/routes/transfers.ts +271 -5
- package/src/apps/management/Billing.ts +18 -5
- package/src/apps/management/routes/webhooks.test.ts +3 -3
- package/src/apps/management/routes/webhooks.ts +24 -25
- package/src/apps/relay/App.test.ts +212 -1
- package/src/apps/relay/App.ts +158 -29
- package/src/apps/relay/Sponsorships.ts +24 -1
- package/src/db/Db.ts +35 -0
- package/src/db/Schema.ts +17 -2
- package/src/db/tables/fundingTransferTransactions.test.ts +43 -0
- package/src/db/tables/fundingTransferTransactions.ts +79 -3
- package/src/db/tables/fundingTransfers.test.ts +26 -0
- package/src/db/tables/fundingTransfers.ts +36 -0
- package/src/db/tables/organizations.test.ts +41 -0
- package/src/db/tables/organizations.ts +49 -0
- package/src/db/tables/projects.test.ts +55 -0
- package/src/db/tables/projects.ts +46 -1
- package/src/db/tables/sponsoredTransactions.test.ts +338 -0
- package/src/db/tables/sponsoredTransactions.ts +197 -13
- package/src/db/tables/webhookSubscriptions.ts +18 -11
- package/src/internal/EarnVaults.ts +5 -5
- package/src/internal/Log.test-d.ts +2 -0
- package/src/internal/Log.ts +2 -0
- package/src/internal/Viem.ts +39 -3
- package/src/internal/Webhooks.test.ts +45 -0
- package/src/internal/funding/DepositWebhook.ts +2 -1
- package/src/internal/funding/Evidence.ts +2 -13
- package/src/internal/funding/Provider.ts +43 -0
- package/src/internal/funding/SourceObservation.ts +5 -9
- package/src/internal/funding/Transfer.test.ts +155 -0
- package/src/internal/funding/Transfer.ts +254 -37
- package/src/internal/funding/TransferReconciliation.test.ts +147 -0
- package/src/internal/funding/TransferReconciliation.ts +264 -0
- package/src/internal/funding/TransferWebhook.test.ts +128 -0
- package/src/internal/funding/TransferWebhook.ts +67 -0
- package/src/internal/funding/index.test.ts +1 -0
- package/src/internal/funding/index.ts +1 -0
- package/src/internal/funding/providers/relay.ts +3 -15
- package/src/internal/funding/providers/stargate.test.ts +169 -4
- package/src/internal/funding/providers/stargate.ts +498 -51
- package/src/internal/webhookDestinations/slack.ts +15 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { AbiFunction, Hex } from 'ox'
|
|
2
|
+
import { base } from 'viem/chains'
|
|
3
|
+
import { tempoMainnet } from 'viem/tempo/chains'
|
|
4
|
+
|
|
5
|
+
import * as Anvil from '../../../../test/Anvil.js'
|
|
2
6
|
|
|
3
7
|
import type * as Action from '../Action.js'
|
|
4
8
|
import type * as Catalog from '../Catalog.js'
|
|
9
|
+
import * as FundingChain from '../Chain.js'
|
|
5
10
|
import * as FundingProvider from '../Provider.js'
|
|
6
11
|
import * as Stargate from './stargate.js'
|
|
7
12
|
|
|
8
13
|
const amount = 1_000_000n
|
|
14
|
+
const destinationPool = '0x8c76e2f6c5ceda9aa7772e7eff30280226c44392'
|
|
9
15
|
const destinationToken = '0x20C000000000000000000000b9537d11c60E8b50'
|
|
10
16
|
const nativeFee = 10_000n
|
|
11
17
|
const otherAddress = '0x9999999999999999999999999999999999999999'
|
|
@@ -13,6 +19,11 @@ const pool = '0x27a16dc786820B16E5c9028b75B99F6f604b5d26'
|
|
|
13
19
|
const recipient = '0x1111111111111111111111111111111111111111'
|
|
14
20
|
const sender = '0x2222222222222222222222222222222222222222'
|
|
15
21
|
const sourceToken = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
|
|
22
|
+
const sourceTransactionHash = '0xfd71359adf5095f2ab512a19e0a2df6c8cc0db14ac8a52286d61287daabdccd4'
|
|
23
|
+
const validAfter = '2020-01-01T00:00:00.000Z'
|
|
24
|
+
const destinationTransactionHash =
|
|
25
|
+
'0x3dfaba0a78b8f4bc09e55e05211c8120729e7b6879efe32613883befbca666da'
|
|
26
|
+
const guid = '0x5549d117c8b23f0ecdf05c2604ed989cf0034f378707bd81319e93834f2f85f2'
|
|
16
27
|
|
|
17
28
|
const approve = AbiFunction.from('function approve(address spender, uint256 amount)')
|
|
18
29
|
const sendToken = AbiFunction.from(
|
|
@@ -26,6 +37,7 @@ describe('stargate', () => {
|
|
|
26
37
|
id: 'stargate',
|
|
27
38
|
name: 'Stargate',
|
|
28
39
|
prepareTransfer: expect.any(Function),
|
|
40
|
+
verifySourceTransaction: expect.any(Function),
|
|
29
41
|
})
|
|
30
42
|
})
|
|
31
43
|
})
|
|
@@ -82,9 +94,158 @@ describe('validateAction', () => {
|
|
|
82
94
|
sourceTokenAddress: sourceToken,
|
|
83
95
|
}),
|
|
84
96
|
).toThrowError(FundingProvider.ProviderPayloadError)
|
|
85
|
-
expect(() =>
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
expect(() =>
|
|
98
|
+
validate(action(), {
|
|
99
|
+
configuration: {
|
|
100
|
+
destinationPoolAddress: destinationPool,
|
|
101
|
+
poolAddress: otherAddress,
|
|
102
|
+
sourceEid: 30_184,
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
).toThrowError(FundingProvider.ProviderPayloadError)
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
describe.skipIf(!Anvil.available)('source and destination evidence', () => {
|
|
110
|
+
const bridgedAmount = '200000'
|
|
111
|
+
const bridgedRecipient = '0x7212623e4cff9ad010d28aa065fad2bf58578783'
|
|
112
|
+
const bridgedSender = '0x52b650a62e384f68880d0a1dc2b84dfed47d5660'
|
|
113
|
+
const configuration = {
|
|
114
|
+
destinationPoolAddress: destinationPool,
|
|
115
|
+
poolAddress: pool,
|
|
116
|
+
sourceEid: 30_184,
|
|
117
|
+
}
|
|
118
|
+
let destinationChain: FundingChain.Chain
|
|
119
|
+
let destination: Anvil.start.ReturnType
|
|
120
|
+
let sourceChain: FundingChain.Chain
|
|
121
|
+
let source: Anvil.start.ReturnType
|
|
122
|
+
|
|
123
|
+
beforeAll(async () => {
|
|
124
|
+
;[destination, source] = await Promise.all([
|
|
125
|
+
Anvil.start({ chain: tempoMainnet, forkUrl: tempoMainnet.rpcUrls.default.http[0]! }),
|
|
126
|
+
Anvil.start({ chain: base, forkUrl: base.rpcUrls.default.http[0]! }),
|
|
127
|
+
])
|
|
128
|
+
destinationChain = FundingChain.from({
|
|
129
|
+
id: 'eip155:4217',
|
|
130
|
+
name: 'Tempo',
|
|
131
|
+
rpcUrls: [destination.rpcUrl],
|
|
132
|
+
slug: 'tempo',
|
|
133
|
+
})
|
|
134
|
+
sourceChain = FundingChain.from({
|
|
135
|
+
id: 'eip155:8453',
|
|
136
|
+
name: 'Base',
|
|
137
|
+
rpcUrls: [source.rpcUrl],
|
|
138
|
+
slug: 'base',
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
afterAll(async () => {
|
|
143
|
+
await Promise.all([destination?.stop(), source?.stop()])
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
test('verifies a direct Base Stargate send and its LayerZero GUID', async () => {
|
|
147
|
+
const receipt = await source.client.getTransactionReceipt({ hash: sourceTransactionHash })
|
|
148
|
+
await expect(
|
|
149
|
+
Stargate.verifySourceTransaction({
|
|
150
|
+
configuration,
|
|
151
|
+
destinationTokenAddress: destinationToken,
|
|
152
|
+
recipient: bridgedRecipient,
|
|
153
|
+
sender: bridgedSender,
|
|
154
|
+
sourceAmount: bridgedAmount,
|
|
155
|
+
sourceChain,
|
|
156
|
+
sourceTokenAddress: sourceToken,
|
|
157
|
+
transactionHash: sourceTransactionHash,
|
|
158
|
+
validAfter,
|
|
159
|
+
}),
|
|
160
|
+
).resolves.toEqual({
|
|
161
|
+
guid,
|
|
162
|
+
sourceBlock: { hash: receipt.blockHash, number: receipt.blockNumber },
|
|
163
|
+
sourceEid: 30_184,
|
|
164
|
+
type: 'verified',
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
test('keeps missing transactions pending and rejects mismatched terms', async () => {
|
|
169
|
+
const options = {
|
|
170
|
+
configuration,
|
|
171
|
+
destinationTokenAddress: destinationToken,
|
|
172
|
+
recipient: bridgedRecipient,
|
|
173
|
+
sender: bridgedSender,
|
|
174
|
+
sourceAmount: bridgedAmount,
|
|
175
|
+
sourceChain,
|
|
176
|
+
sourceTokenAddress: sourceToken,
|
|
177
|
+
transactionHash: sourceTransactionHash,
|
|
178
|
+
validAfter,
|
|
179
|
+
}
|
|
180
|
+
await expect(
|
|
181
|
+
Stargate.verifySourceTransaction({
|
|
182
|
+
...options,
|
|
183
|
+
transactionHash: `0x${'99'.repeat(32)}`,
|
|
184
|
+
}),
|
|
185
|
+
).resolves.toEqual({ type: 'pending' })
|
|
186
|
+
await expect(
|
|
187
|
+
Stargate.verifySourceTransaction({ ...options, recipient: otherAddress }),
|
|
188
|
+
).resolves.toEqual({ type: 'invalid' })
|
|
189
|
+
await expect(
|
|
190
|
+
Stargate.verifySourceTransaction({ ...options, validAfter: '2099-01-01T00:00:00.000Z' }),
|
|
191
|
+
).resolves.toEqual({ type: 'invalid' })
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
test('rejects reverted and malformed source transactions', async () => {
|
|
195
|
+
const account = Anvil.getAccount(1)
|
|
196
|
+
const reverted = await source.client.sendTransactionSync({
|
|
197
|
+
account,
|
|
198
|
+
data: '0xdeadbeef',
|
|
199
|
+
gas: 100_000n,
|
|
200
|
+
to: pool,
|
|
201
|
+
})
|
|
202
|
+
const malformed = await source.client.sendTransactionSync({
|
|
203
|
+
account,
|
|
204
|
+
data: '0xdeadbeef',
|
|
205
|
+
gas: 100_000n,
|
|
206
|
+
to: account.address,
|
|
207
|
+
})
|
|
208
|
+
const options = {
|
|
209
|
+
configuration,
|
|
210
|
+
destinationTokenAddress: destinationToken,
|
|
211
|
+
recipient: bridgedRecipient,
|
|
212
|
+
sender: account.address,
|
|
213
|
+
sourceAmount: bridgedAmount,
|
|
214
|
+
sourceChain,
|
|
215
|
+
sourceTokenAddress: sourceToken,
|
|
216
|
+
validAfter,
|
|
217
|
+
}
|
|
218
|
+
await expect(
|
|
219
|
+
Stargate.verifySourceTransaction({
|
|
220
|
+
...options,
|
|
221
|
+
transactionHash: reverted.transactionHash,
|
|
222
|
+
}),
|
|
223
|
+
).resolves.toEqual({ type: 'invalid' })
|
|
224
|
+
await expect(
|
|
225
|
+
Stargate.verifySourceTransaction({
|
|
226
|
+
...options,
|
|
227
|
+
transactionHash: malformed.transactionHash,
|
|
228
|
+
}),
|
|
229
|
+
).resolves.toEqual({ type: 'invalid' })
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
test('discovers and verifies the exact Tempo USDC.e delivery', async () => {
|
|
233
|
+
const receipt = await destination.client.getTransactionReceipt({
|
|
234
|
+
hash: destinationTransactionHash,
|
|
235
|
+
})
|
|
236
|
+
await expect(
|
|
237
|
+
Stargate.verifyDestinationDelivery({
|
|
238
|
+
configuration,
|
|
239
|
+
destinationAmount: bridgedAmount,
|
|
240
|
+
destinationBlockNumber: receipt.blockNumber.toString(),
|
|
241
|
+
destinationChain,
|
|
242
|
+
destinationTokenAddress: destinationToken,
|
|
243
|
+
guid,
|
|
244
|
+
recipient: bridgedRecipient,
|
|
245
|
+
sourceChainId: 'eip155:8453',
|
|
246
|
+
sourceTokenAddress: sourceToken,
|
|
247
|
+
}),
|
|
248
|
+
).resolves.toEqual({ transactionHash: destinationTransactionHash, type: 'verified' })
|
|
88
249
|
})
|
|
89
250
|
})
|
|
90
251
|
|
|
@@ -144,7 +305,11 @@ declare namespace action {
|
|
|
144
305
|
function validate(candidate: Action.EvmCalls, options: validate.Options = {}) {
|
|
145
306
|
return Stargate.validateAction({
|
|
146
307
|
action: candidate,
|
|
147
|
-
configuration: options.configuration ?? {
|
|
308
|
+
configuration: options.configuration ?? {
|
|
309
|
+
destinationPoolAddress: destinationPool,
|
|
310
|
+
poolAddress: pool,
|
|
311
|
+
sourceEid: 30_184,
|
|
312
|
+
},
|
|
148
313
|
destinationTokenAddress: options.destinationTokenAddress ?? destinationToken,
|
|
149
314
|
recipient,
|
|
150
315
|
sender,
|