You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -373,8 +369,90 @@ Asset delivery depends on whether the destination is a VM chain or Bitcoin. For
373
369
374
370
#### EVM deliveries
375
371
372
+
Call the destination chain oracle `getOrderData.order.orderData.remoteOracle`. You can get remote chain from the output `getOrderData.order.orderData.outputs[].chainId`.
373
+
374
+
<TabssyncKey="lang">
375
+
<TabItemlabel="Typescript">
376
+
377
+
```typescript
378
+
// It is assumed you are continuing from the above steps.
379
+
import {ethers} from'ethers';
380
+
381
+
const oracleAbi ="...";
382
+
383
+
// The oracle allows filling multiple outputs from different orders in a single transaction.
384
+
// They do have to go to the same chain.
385
+
// For simplicity, this function assumes that all outputs goes to the same chain but it may not be the case.
The order contains a low level encoded version of the Bitcoin address. There exist 5 different types of Bitcoin scripts, P2PKH, P2SH, P2WPKH, P2WSH, andP2TR addresses using 3 different ways to encode the script into an address: P2PKHandP2SH uses `RIPEMD-160(SHA-256(pubkey/script))`with1and3 prepended respectively, P2WPKHandP2WSH uses SHA256 encoded with Bech32 with either 20or32bytes encoded respectively prepended with bc1 and lastly P2TR Bech32m encodes the output key directly.
0 commit comments