@openocean.finance/openocean-sdk 0.1.99 → 0.2.2
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/package.json +1 -1
- package/lib/utils/limit-order-sdk/README.md +0 -124
- package/lib/utils/limit-order-sdk/abi/ERC20ABI.json +0 -222
- package/lib/utils/limit-order-sdk/abi/LimitOrderProtocol.json +0 -1506
- package/lib/utils/limit-order-sdk/connector/private-key-provider.connector.d.ts +0 -13
- package/lib/utils/limit-order-sdk/connector/private-key-provider.connector.js +0 -34
- package/lib/utils/limit-order-sdk/connector/private-key-provider.connector.js.map +0 -1
- package/lib/utils/limit-order-sdk/connector/provider.connector.d.ts +0 -8
- package/lib/utils/limit-order-sdk/connector/provider.connector.js +0 -3
- package/lib/utils/limit-order-sdk/connector/provider.connector.js.map +0 -1
- package/lib/utils/limit-order-sdk/connector/web3-provider.connector.d.ts +0 -12
- package/lib/utils/limit-order-sdk/connector/web3-provider.connector.js +0 -37
- package/lib/utils/limit-order-sdk/connector/web3-provider.connector.js.map +0 -1
- package/lib/utils/limit-order-sdk/docs/about.md +0 -51
- package/lib/utils/limit-order-sdk/docs/cancel-all-limit-orders.md +0 -41
- package/lib/utils/limit-order-sdk/docs/cancel-limit-order-rfq.md +0 -68
- package/lib/utils/limit-order-sdk/docs/cancel-limit-order.md +0 -38
- package/lib/utils/limit-order-sdk/docs/create-limit-order-rfq.md +0 -82
- package/lib/utils/limit-order-sdk/docs/create-limit-order.md +0 -110
- package/lib/utils/limit-order-sdk/docs/domain-separator.md +0 -22
- package/lib/utils/limit-order-sdk/docs/fill-limit-order-rfq.md +0 -103
- package/lib/utils/limit-order-sdk/docs/fill-limit-order.md +0 -57
- package/lib/utils/limit-order-sdk/docs/limit-order-rfq-structure.md +0 -24
- package/lib/utils/limit-order-sdk/docs/limit-order-structure.md +0 -14
- package/lib/utils/limit-order-sdk/docs/nonce.md +0 -54
- package/lib/utils/limit-order-sdk/docs/predicate.md +0 -90
- package/lib/utils/limit-order-sdk/docs/quick-start.md +0 -78
- package/lib/utils/limit-order-sdk/docs/remaining.md +0 -51
- package/lib/utils/limit-order-sdk/docs/validate-limit-order.md +0 -38
- package/lib/utils/limit-order-sdk/erc20.facade.d.ts +0 -10
- package/lib/utils/limit-order-sdk/erc20.facade.js +0 -19
- package/lib/utils/limit-order-sdk/erc20.facade.js.map +0 -1
- package/lib/utils/limit-order-sdk/index.d.ts +0 -11
- package/lib/utils/limit-order-sdk/index.js +0 -15
- package/lib/utils/limit-order-sdk/index.js.map +0 -1
- package/lib/utils/limit-order-sdk/limit-order-predicate.builder.d.ts +0 -13
- package/lib/utils/limit-order-sdk/limit-order-predicate.builder.js +0 -51
- package/lib/utils/limit-order-sdk/limit-order-predicate.builder.js.map +0 -1
- package/lib/utils/limit-order-sdk/limit-order-protocol.const.d.ts +0 -20
- package/lib/utils/limit-order-sdk/limit-order-protocol.const.js +0 -46
- package/lib/utils/limit-order-sdk/limit-order-protocol.const.js.map +0 -1
- package/lib/utils/limit-order-sdk/limit-order-protocol.facade.d.ts +0 -35
- package/lib/utils/limit-order-sdk/limit-order-protocol.facade.js +0 -177
- package/lib/utils/limit-order-sdk/limit-order-protocol.facade.js.map +0 -1
- package/lib/utils/limit-order-sdk/limit-order.builder.d.ts +0 -20
- package/lib/utils/limit-order-sdk/limit-order.builder.js +0 -113
- package/lib/utils/limit-order-sdk/limit-order.builder.js.map +0 -1
- package/lib/utils/limit-order-sdk/model/abi.model.d.ts +0 -21
- package/lib/utils/limit-order-sdk/model/abi.model.js +0 -3
- package/lib/utils/limit-order-sdk/model/abi.model.js.map +0 -1
- package/lib/utils/limit-order-sdk/model/eip712.model.d.ts +0 -25
- package/lib/utils/limit-order-sdk/model/eip712.model.js +0 -3
- package/lib/utils/limit-order-sdk/model/eip712.model.js.map +0 -1
- package/lib/utils/limit-order-sdk/model/limit-order-protocol.model.d.ts +0 -87
- package/lib/utils/limit-order-sdk/model/limit-order-protocol.model.js +0 -39
- package/lib/utils/limit-order-sdk/model/limit-order-protocol.model.js.map +0 -1
- package/lib/utils/limit-order-sdk/package.json +0 -80
- package/lib/utils/limit-order-sdk/utils/get-rpc-code.d.ts +0 -1
- package/lib/utils/limit-order-sdk/utils/get-rpc-code.js +0 -29
- package/lib/utils/limit-order-sdk/utils/get-rpc-code.js.map +0 -1
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.const.d.ts +0 -15
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.const.js +0 -134
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.const.js.map +0 -1
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.helpers.d.ts +0 -13
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.helpers.js +0 -154
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.helpers.js.map +0 -1
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.model.d.ts +0 -29
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.model.js +0 -3
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.model.js.map +0 -1
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.utils.d.ts +0 -2
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.utils.js +0 -39
- package/lib/utils/limit-order-sdk/utils/limit-order-rfq.utils.js.map +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ProviderConnector } from './provider.connector';
|
|
2
|
-
import Web3 from 'web3';
|
|
3
|
-
import { EIP712TypedData } from '../model/eip712.model';
|
|
4
|
-
import { AbiItem } from '../model/abi.model';
|
|
5
|
-
export declare class PrivateKeyProviderConnector implements ProviderConnector {
|
|
6
|
-
private readonly privateKey;
|
|
7
|
-
protected readonly web3Provider: Web3;
|
|
8
|
-
constructor(privateKey: string, web3Provider: Web3);
|
|
9
|
-
contractEncodeABI(abi: AbiItem[], address: string | null, methodName: string, methodParams: unknown[]): string;
|
|
10
|
-
signTypedData(_walletAddress: string, typedData: EIP712TypedData, _typedDataHash?: string): Promise<string>;
|
|
11
|
-
ethCall(contractAddress: string, callData: string): Promise<string>;
|
|
12
|
-
decodeABIParameter<T>(type: string, hex: string): T;
|
|
13
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PrivateKeyProviderConnector = void 0;
|
|
4
|
-
const eth_sig_util_1 = require("eth-sig-util");
|
|
5
|
-
class PrivateKeyProviderConnector {
|
|
6
|
-
constructor(privateKey, web3Provider) {
|
|
7
|
-
this.privateKey = privateKey;
|
|
8
|
-
this.web3Provider = web3Provider;
|
|
9
|
-
}
|
|
10
|
-
contractEncodeABI(abi, address, methodName, methodParams) {
|
|
11
|
-
const contract = new this.web3Provider.eth.Contract(abi, address === null ? undefined : address);
|
|
12
|
-
return contract.methods[methodName](...methodParams).encodeABI();
|
|
13
|
-
}
|
|
14
|
-
signTypedData(_walletAddress, typedData,
|
|
15
|
-
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
16
|
-
_typedDataHash = '') {
|
|
17
|
-
const result = eth_sig_util_1.signTypedData_v4(Buffer.from(this.privateKey, 'hex'), {
|
|
18
|
-
data: typedData,
|
|
19
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
20
|
-
});
|
|
21
|
-
return Promise.resolve(result);
|
|
22
|
-
}
|
|
23
|
-
ethCall(contractAddress, callData) {
|
|
24
|
-
return this.web3Provider.eth.call({
|
|
25
|
-
to: contractAddress,
|
|
26
|
-
data: callData,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
decodeABIParameter(type, hex) {
|
|
30
|
-
return this.web3Provider.eth.abi.decodeParameter(type, hex);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.PrivateKeyProviderConnector = PrivateKeyProviderConnector;
|
|
34
|
-
//# sourceMappingURL=private-key-provider.connector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-key-provider.connector.js","sourceRoot":"","sources":["../../src/connector/private-key-provider.connector.ts"],"names":[],"mappings":";;;AAKA,+CAAyD;AAEzD,MAAa,2BAA2B;IACpC,YACqB,UAAkB,EAChB,YAAkB;QADpB,eAAU,GAAV,UAAU,CAAQ;QAChB,iBAAY,GAAZ,YAAY,CAAM;IACtC,CAAC;IAEJ,iBAAiB,CACb,GAAc,EACd,OAAsB,EACtB,UAAkB,EAClB,YAAuB;QAEvB,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAC/C,GAAoB,EACpB,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CACzC,CAAC;QAEF,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,CAAC;IACrE,CAAC;IAED,aAAa,CACT,cAAsB,EACtB,SAA0B;IAC1B,gEAAgE;IAChE,cAAc,GAAG,EAAE;QAEnB,MAAM,MAAM,GAAG,+BAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE;YACjE,IAAI,EAAE,SAAS;YACf,iEAAiE;SAClD,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,eAAuB,EAAE,QAAgB;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;YAC9B,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,QAAQ;SACjB,CAAC,CAAC;IACP,CAAC;IAED,kBAAkB,CAAI,IAAY,EAAE,GAAW;QAC3C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAM,CAAC;IACrE,CAAC;CACJ;AA5CD,kEA4CC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EIP712TypedData } from '../model/eip712.model';
|
|
2
|
-
import { AbiItem } from '../model/abi.model';
|
|
3
|
-
export interface ProviderConnector {
|
|
4
|
-
contractEncodeABI(abi: AbiItem[], address: string | null, methodName: string, methodParams: unknown[]): string;
|
|
5
|
-
signTypedData(walletAddress: string, typedData: EIP712TypedData, typedDataHash: string): Promise<string>;
|
|
6
|
-
ethCall(contractAddress: string, callData: string): Promise<string>;
|
|
7
|
-
decodeABIParameter<T>(type: string, hex: string): T;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.connector.js","sourceRoot":"","sources":["../../src/connector/provider.connector.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ProviderConnector } from './provider.connector';
|
|
2
|
-
import Web3 from 'web3';
|
|
3
|
-
import { EIP712TypedData } from '../model/eip712.model';
|
|
4
|
-
import { AbiItem } from '../model/abi.model';
|
|
5
|
-
export declare class Web3ProviderConnector implements ProviderConnector {
|
|
6
|
-
protected readonly web3Provider: Web3;
|
|
7
|
-
constructor(web3Provider: Web3);
|
|
8
|
-
contractEncodeABI(abi: AbiItem[], address: string | null, methodName: string, methodParams: unknown[]): string;
|
|
9
|
-
signTypedData(walletAddress: string, typedData: EIP712TypedData, _typedDataHash: string): Promise<string>;
|
|
10
|
-
ethCall(contractAddress: string, callData: string): Promise<string>;
|
|
11
|
-
decodeABIParameter<T>(type: string, hex: string): T;
|
|
12
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Web3ProviderConnector = void 0;
|
|
4
|
-
class Web3ProviderConnector {
|
|
5
|
-
constructor(web3Provider) {
|
|
6
|
-
this.web3Provider = web3Provider;
|
|
7
|
-
}
|
|
8
|
-
contractEncodeABI(abi, address, methodName, methodParams) {
|
|
9
|
-
const contract = new this.web3Provider.eth.Contract(abi, address === null ? undefined : address);
|
|
10
|
-
return contract.methods[methodName](...methodParams).encodeABI();
|
|
11
|
-
}
|
|
12
|
-
signTypedData(walletAddress, typedData,
|
|
13
|
-
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
14
|
-
_typedDataHash) {
|
|
15
|
-
const extendedWeb3 = this.web3Provider.extend({
|
|
16
|
-
methods: [
|
|
17
|
-
{
|
|
18
|
-
name: 'signTypedDataV4',
|
|
19
|
-
call: 'eth_signTypedData_v4',
|
|
20
|
-
params: 2,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
});
|
|
24
|
-
return extendedWeb3.signTypedDataV4(walletAddress, JSON.stringify(typedData));
|
|
25
|
-
}
|
|
26
|
-
ethCall(contractAddress, callData) {
|
|
27
|
-
return this.web3Provider.eth.call({
|
|
28
|
-
to: contractAddress,
|
|
29
|
-
data: callData,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
decodeABIParameter(type, hex) {
|
|
33
|
-
return this.web3Provider.eth.abi.decodeParameter(type, hex);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.Web3ProviderConnector = Web3ProviderConnector;
|
|
37
|
-
//# sourceMappingURL=web3-provider.connector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"web3-provider.connector.js","sourceRoot":"","sources":["../../src/connector/web3-provider.connector.ts"],"names":[],"mappings":";;;AAUA,MAAa,qBAAqB;IAC9B,YAA+B,YAAkB;QAAlB,iBAAY,GAAZ,YAAY,CAAM;IAAG,CAAC;IAErD,iBAAiB,CACb,GAAc,EACd,OAAsB,EACtB,UAAkB,EAClB,YAAuB;QAEvB,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAC/C,GAAoB,EACpB,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CACzC,CAAC;QAEF,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,CAAC;IACrE,CAAC;IAED,aAAa,CACT,aAAqB,EACrB,SAA0B;IAC1B,gEAAgE;IAChE,cAAsB;QAEtB,MAAM,YAAY,GAAiB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YACxD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,sBAAsB;oBAC5B,MAAM,EAAE,CAAC;iBACZ;aACJ;SACJ,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC,eAAe,CAC/B,aAAa,EACb,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAC5B,CAAC;IACN,CAAC;IAED,OAAO,CAAC,eAAuB,EAAE,QAAgB;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;YAC9B,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,QAAQ;SACjB,CAAC,CAAC;IACP,CAAC;IAED,kBAAkB,CAAI,IAAY,EAAE,GAAW;QAC3C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAM,CAAC;IACrE,CAAC;CACJ;AAjDD,sDAiDC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://app.1inch.io/assets/images/logo.svg" width="200" alt="1inch network" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# 1inch Limit Order Protocol
|
|
6
|
-
|
|
7
|
-
1inch limit order protocol is a set of smart contracts, that can work on any EVM based blockchains (Ethereum, Binance Smart Chain, Polygon, etc.). Key features of the protocol is **extreme flexibility** and high **gas efficiency** that achieved by using two different order types - regular _Limit Order_ and _RFQ Order_.
|
|
8
|
-
|
|
9
|
-
Smart Contract allows users to place limit orders and RFQ Orders, that later could be filled on-chain.
|
|
10
|
-
Both type of orders is a data structure created off-chain and signed according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712).
|
|
11
|
-
|
|
12
|
-
## Order types
|
|
13
|
-
|
|
14
|
-
#### Limit Order
|
|
15
|
-
|
|
16
|
-
1inch users can place their limit orders via 1inch [dApp](https://app.1inch.io/#/1/limit-order/WETH/DAI).
|
|
17
|
-
Anyone can fetch this signed orders using REST API endpoint ([Ethereum](https://limit-orders.1inch.exchange/swagger/ethereum/), [BSC](https://limit-orders.1inch.exchange/swagger/binance/), [Polygon](https://limit-orders.1inch.exchange/swagger/polygon/)) to perform trade by filling order on-chain.
|
|
18
|
-
To do that he or she pass signed order to the `fillOrder` method on the contract ([Ethereum](https://etherscan.io/address/0x119c71d3bbac22029622cbaec24854d3d32d2828), [BSC](https://bscscan.com/address/0x1e38eff998df9d3669e32f4ff400031385bf6362), [Polygon](https://polygonscan.com/address/0x94bc2a1c732bcad7343b25af48385fe76e08734f)).
|
|
19
|
-
_Note: trades buyer and seller should approve their asset to be used by 1inch limit order contract._
|
|
20
|
-
|
|
21
|
-
Pathfinder algorithm use limit orders placed via `dApp` and REST API, as a liquidity source, and make it available to fill to any 1inch user.
|
|
22
|
-
So, 1inch limit orders are integrated into the DeFi ecosystem from the day one.
|
|
23
|
-
|
|
24
|
-
Limit orders are extremely **flexible** limit order, can be configured with:
|
|
25
|
-
|
|
26
|
-
1. Order execution predicate.
|
|
27
|
-
- Typical usage is checking that certain time stamp or block number. With this you can set certain expiration time.
|
|
28
|
-
- You can specify construct any predicate that you want, for example check that certain price is higher than oracle price, to implement stop loss or take profit stategies
|
|
29
|
-
2. Helper function for asset price evaluation.
|
|
30
|
-
- Function that will allow to extract assets price from arbitrary on-chain source
|
|
31
|
-
3. Callback, for to notify maker on order execution.
|
|
32
|
-
|
|
33
|
-
#### RFQ order
|
|
34
|
-
|
|
35
|
-
RFQ orders has different use case, and dedicated to market makers at first place. Typical scenario is following:
|
|
36
|
-
Market maker create a bunch of RFQ Orders, and expose it via API.
|
|
37
|
-
Trading or platform / algorithm ask market maker quotes, and if it match his needs, he receives signed RFQ order from market maker.
|
|
38
|
-
|
|
39
|
-
**Gas optimized order** with restricted capabilities suitable **for market makers**
|
|
40
|
-
|
|
41
|
-
- Support expiration time
|
|
42
|
-
- Support cancelation by order id
|
|
43
|
-
- RFQ Order could be filled only once
|
|
44
|
-
- Partial Fill is possible (once)
|
|
45
|
-
|
|
46
|
-
## More resources
|
|
47
|
-
|
|
48
|
-
- You can use it right in [1inch dApp](https://app.1inch.io/#/1/limit-order/WETH/DAI)
|
|
49
|
-
- Smart Contracts [repository](https://github.com/1inch/limit-order-protocol/)
|
|
50
|
-
- Utils library [repository](https://github.com/1inch/limit-order-protocol-utils/)
|
|
51
|
-
- REST API ([Ethereum](https://limit-orders.1inch.exchange/swagger/ethereum/), [BSC](https://limit-orders.1inch.exchange/swagger/binance/), [Polygon](https://limit-orders.1inch.exchange/swagger/polygon/))
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Cancel all limit orders
|
|
2
|
-
|
|
3
|
-
`LimitOrderProtocolFacade.advanceNonce(count)`
|
|
4
|
-
or
|
|
5
|
-
`LimitOrderProtocolFacade.increaseNonce()`
|
|
6
|
-
|
|
7
|
-
## First of all, read about [Nonce](#nonce)
|
|
8
|
-
|
|
9
|
-
`advanceNonce(count) or increaseNonce()` increments the nonce and all limit orders with a predicate to the previous nonce value become invalid
|
|
10
|
-
|
|
11
|
-
> **Warning!**
|
|
12
|
-
> The approach only works when all orders have the `nonceEquals` predicate
|
|
13
|
-
|
|
14
|
-
## Example:
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import Web3 from 'web3';
|
|
18
|
-
import {
|
|
19
|
-
LimitOrderProtocolFacade,
|
|
20
|
-
Web3ProviderConnector,
|
|
21
|
-
} from '@1inch/limit-order-protocol';
|
|
22
|
-
|
|
23
|
-
const walletAddress = '0xhhh...';
|
|
24
|
-
const contractAddress = '0x5fa31604fc5dcebfcac2481f9fa59d174126e5e6';
|
|
25
|
-
|
|
26
|
-
const connector = new Web3ProviderConnector(new Web3('...'));
|
|
27
|
-
const limitOrderProtocolFacade = new LimitOrderProtocolFacade(
|
|
28
|
-
contractAddress,
|
|
29
|
-
connector
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const callData = limitOrderProtocolFacade.increaseNonce();
|
|
33
|
-
|
|
34
|
-
sendTransaction({
|
|
35
|
-
from: walletAddress,
|
|
36
|
-
gas: 210_000, // Set your gas limit
|
|
37
|
-
gasPrice: 40000, // Set your gas price
|
|
38
|
-
to: contractAddress,
|
|
39
|
-
data: callData,
|
|
40
|
-
});
|
|
41
|
-
```
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Canceling a limit order:
|
|
2
|
-
|
|
3
|
-
It is assumed that RFQ orders will be created with a short lifetime.
|
|
4
|
-
But, if it becomes necessary to cancel the created RFQ order, then this can be done as follows:
|
|
5
|
-
|
|
6
|
-
## Parameters:
|
|
7
|
-
|
|
8
|
-
| Parameter | Type | Description |
|
|
9
|
-
| --------- | -------- | ----------------------------------------------------------------------------------------------------- |
|
|
10
|
-
| `info` | `String` | information about an RFQ order (see above in section [RFQ structure](./limit-order-rfq-structure.md)) |
|
|
11
|
-
|
|
12
|
-
## Creating with a typescript/javascript:
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import Web3 from 'web3';
|
|
16
|
-
import {
|
|
17
|
-
LimitOrderProtocolFacade,
|
|
18
|
-
Web3ProviderConnector,
|
|
19
|
-
RFQOrder
|
|
20
|
-
} from '@1inch/limit-order-protocol';
|
|
21
|
-
|
|
22
|
-
const contractAddress = '0x7643b8c2457c1f36dc6e3b8f8e112fdf6da7698a';
|
|
23
|
-
const walletAddress = '0xd337163ef588f2ee7cdd30a3387660019be415c9';
|
|
24
|
-
|
|
25
|
-
const web3 = new Web3('...');
|
|
26
|
-
// You can create and use a custom provider connector (for example: ethers)
|
|
27
|
-
const connector = new Web3ProviderConnector(web3);
|
|
28
|
-
|
|
29
|
-
const limitOrderProtocolFacade = new LimitOrderProtocolFacade(
|
|
30
|
-
contractAddress,
|
|
31
|
-
connector
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const RFQorder: RFQOrder = {...};
|
|
35
|
-
|
|
36
|
-
const callData = limitOrderProtocolFacade.cancelRFQOrder(RFQorder.info);
|
|
37
|
-
|
|
38
|
-
// Send transaction for the RFQ order canceling
|
|
39
|
-
// Must be implemented
|
|
40
|
-
sendTransaction({
|
|
41
|
-
from: walletAddress,
|
|
42
|
-
gas: 50_000, // Set your gas limit
|
|
43
|
-
gasPrice: 600000000, // Set your gas price
|
|
44
|
-
to: contractAddress,
|
|
45
|
-
data: callData,
|
|
46
|
-
});
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Canceling via CLI (with arguments):
|
|
50
|
-
|
|
51
|
-
`gasPrice` - in units of GWEI
|
|
52
|
-
|
|
53
|
-
```shell
|
|
54
|
-
npx limit-order-rfq-utils --\
|
|
55
|
-
--operation=cancel \
|
|
56
|
-
--chainId=56 \
|
|
57
|
-
--privateKey={xxx} \
|
|
58
|
-
--gasPrice=6 \
|
|
59
|
-
--orderInfo=29941961886664662336741887180811
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Canceling via CLI (through prompt):
|
|
63
|
-
|
|
64
|
-
```shell
|
|
65
|
-
npx limit-order-rfq-utils
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
As result, you will receive a link to the transaction hash.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Cancel a limit order
|
|
2
|
-
|
|
3
|
-
`LimitOrderProtocolFacade.cancelLimitOrder()`
|
|
4
|
-
|
|
5
|
-
## Parameters:
|
|
6
|
-
|
|
7
|
-
| Parameter | Type | Description |
|
|
8
|
-
| --------- | ------------ | --------------------------------------------------------------------------------- |
|
|
9
|
-
| `order` | `LimitOrder` | Structure of limit order. See [Limit order structure](./limit-order-structure.md) |
|
|
10
|
-
|
|
11
|
-
## Example:
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import Web3 from 'web3';
|
|
15
|
-
import {
|
|
16
|
-
LimitOrderProtocolFacade,
|
|
17
|
-
LimitOrder,
|
|
18
|
-
Web3ProviderConnector
|
|
19
|
-
} from '@1inch/limit-order-protocol';
|
|
20
|
-
|
|
21
|
-
const walletAddress = '0xhhh...';
|
|
22
|
-
const contractAddress = '0x5fa31604fc5dcebfcac2481f9fa59d174126e5e6';
|
|
23
|
-
|
|
24
|
-
const order: LimitOrder = {...};
|
|
25
|
-
|
|
26
|
-
const connector = new Web3ProviderConnector(new Web3('...'));
|
|
27
|
-
const limitOrderProtocolFacade = new LimitOrderProtocolFacade(contractAddress, connector);
|
|
28
|
-
|
|
29
|
-
const callData = limitOrderProtocolFacade.cancelLimitOrder(order);
|
|
30
|
-
|
|
31
|
-
sendTransaction({
|
|
32
|
-
from: walletAddress,
|
|
33
|
-
gas: 210_000, // Set your gas limit
|
|
34
|
-
gasPrice: 40000, // Set your gas price
|
|
35
|
-
to: contractAddress,
|
|
36
|
-
data: callData,
|
|
37
|
-
});
|
|
38
|
-
```
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Creating an RFQ order:
|
|
2
|
-
|
|
3
|
-
## Parameters:
|
|
4
|
-
|
|
5
|
-
| Field | Type | Description |
|
|
6
|
-
| -------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
-
| `id` | `Number` | is a pass-through, integer identifier starting at 1 |
|
|
8
|
-
| `expiresInTimestamp` | `Number` | is the timestamp in seconds when the limit order will no longer be available for execution. For example: 1623166270029 |
|
|
9
|
-
| `makerAssetAddress` | `String` | the address of the asset you want to sell (address of a token contract) |
|
|
10
|
-
| `takerAssetAddress` | `String` | the address of the asset you want to buy (address of a token contract) |
|
|
11
|
-
| `makerAddress` | `String` | an address of the maker (wallet address) |
|
|
12
|
-
| `takerAddress` | `String?` | the address of the taker for whom the limit order is being created. _This is an optional parameter_, if it is not specified, then the limit order will be available for execution for everyone |
|
|
13
|
-
| `makerAmount` | `String` | the number of maker asset tokens that you want to sell (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
14
|
-
| `takerAmount` | `String` | the number of taker asset tokens that you want to receive for selling the maker asset (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
15
|
-
|
|
16
|
-
## Creating with a typescript/javascript:
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import Web3 from 'web3';
|
|
20
|
-
import {
|
|
21
|
-
LimitOrderBuilder,
|
|
22
|
-
Web3ProviderConnector,
|
|
23
|
-
} from '@1inch/limit-order-protocol';
|
|
24
|
-
|
|
25
|
-
const contractAddress = '0x7643b8c2457c1f36dc6e3b8f8e112fdf6da7698a';
|
|
26
|
-
const walletAddress = '0xd337163ef588f2ee7cdd30a3387660019be415c9';
|
|
27
|
-
const chainId = 1;
|
|
28
|
-
|
|
29
|
-
const web3 = new Web3('...');
|
|
30
|
-
// You can create and use a custom provider connector (for example: ethers)
|
|
31
|
-
const connector = new Web3ProviderConnector(web3);
|
|
32
|
-
|
|
33
|
-
const limitOrderBuilder = new LimitOrderBuilder(
|
|
34
|
-
contractAddress,
|
|
35
|
-
chainId,
|
|
36
|
-
connector
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const RFQorder = limitOrderBuilder.buildRFQOrder({
|
|
40
|
-
id: 1,
|
|
41
|
-
expiresInTimestamp: 1623166102,
|
|
42
|
-
makerAssetAddress: '0x111111111117dc0aa78b770fa6a738034120c302',
|
|
43
|
-
takerAssetAddress: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
|
|
44
|
-
makerAddress: walletAddress,
|
|
45
|
-
makerAmount: '1000000000000000000',
|
|
46
|
-
takerAmount: '9000000000000000000',
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Creating via CLI (with arguments):
|
|
51
|
-
|
|
52
|
-
```shell
|
|
53
|
-
npx limit-order-rfq-utils --\
|
|
54
|
-
--operation=create \
|
|
55
|
-
--chainId=56 \
|
|
56
|
-
--privateKey={xxx} \
|
|
57
|
-
--orderId=1 \
|
|
58
|
-
--expiresIn=300 \
|
|
59
|
-
--makerAssetAddress=0x111111111117dc0aa78b770fa6a738034120c302 \
|
|
60
|
-
--takerAssetAddress=0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3 \
|
|
61
|
-
--makerAmount=1000000000000000000 \
|
|
62
|
-
--takerAmount=4000000000000000000 \
|
|
63
|
-
--takerAddress=""
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Creating via CLI (through prompt):
|
|
67
|
-
|
|
68
|
-
```shell
|
|
69
|
-
npx limit-order-rfq-utils
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
As result you will receive a structure of [RFQ order](./limit-order-rfq-structure.md). Example:
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
"info": "29941961886664662331741887180822",
|
|
77
|
-
"makerAsset": "0x111111111117dc0aa78b770fa6a738034120c302",
|
|
78
|
-
"takerAsset": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",
|
|
79
|
-
"makerAssetData": "0x23b872dd00000000...0000",
|
|
80
|
-
"takerAssetData": "0x23b872dd00000000...0000"
|
|
81
|
-
}
|
|
82
|
-
```
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Create a limit order
|
|
2
|
-
|
|
3
|
-
`LimitOrderBuilder.buildLimitOrder()`
|
|
4
|
-
|
|
5
|
-
## Parameters:
|
|
6
|
-
|
|
7
|
-
| Field | Type | Description |
|
|
8
|
-
| ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
-
| `makerAssetAddress` | `String` | the address of the asset you want to sell (address of a token contract) |
|
|
10
|
-
| `takerAssetAddress` | `String` | the address of the asset you want to buy (address of a token contract) |
|
|
11
|
-
| `makerAddress` | `String` | an address of the maker (wallet address) |
|
|
12
|
-
| `takerAddress` | `String?` | the address of the taker for whom the limit order is being created. _This is an optional parameter_, if it is not specified, then the limit order will be available for execution for everyone |
|
|
13
|
-
| `makerAmount` | `String` | the number of maker asset tokens that you want to sell (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
14
|
-
| `takerAmount` | `String` | the number of taker asset tokens that you want to receive for selling the maker asset (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
15
|
-
| `predicate` | `String?` | a predicate call data. Default: `0x`. See [Predicate docs](./predicate.md) |
|
|
16
|
-
| `permit` | `String?` | a permit call data. Default: `0x` |
|
|
17
|
-
| `interaction` | `String?` | an interaction call data. Default: `0x` |
|
|
18
|
-
|
|
19
|
-
## Example:
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import Web3 from 'web3';
|
|
23
|
-
import {
|
|
24
|
-
LimitOrderBuilder,
|
|
25
|
-
Web3ProviderConnector,
|
|
26
|
-
} from '@1inch/limit-order-protocol';
|
|
27
|
-
|
|
28
|
-
const contractAddress = '0x7643b8c2457c1f36dc6e3b8f8e112fdf6da7698a';
|
|
29
|
-
const walletAddress = '0xd337163ef588f2ee7cdd30a3387660019be415c9';
|
|
30
|
-
const chainId = 1;
|
|
31
|
-
|
|
32
|
-
const web3 = new Web3('...');
|
|
33
|
-
// You can create and use a custom provider connector (for example: ethers)
|
|
34
|
-
const connector = new Web3ProviderConnector(web3);
|
|
35
|
-
|
|
36
|
-
const limitOrderBuilder = new LimitOrderBuilder(
|
|
37
|
-
contractAddress,
|
|
38
|
-
chainId,
|
|
39
|
-
connector
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
// ...
|
|
43
|
-
|
|
44
|
-
const limitOrder = limitOrderBuilder.buildLimitOrder({
|
|
45
|
-
makerAssetAddress: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
|
|
46
|
-
takerAssetAddress: '0x111111111117dc0aa78b770fa6a738034120c302',
|
|
47
|
-
makerAddress: '0xfb3c7ebccccAA12B5A884d612393969Adddddddd',
|
|
48
|
-
makerAmount: '100',
|
|
49
|
-
takerAmount: '200',
|
|
50
|
-
predicate: '0x0',
|
|
51
|
-
permit: '0x0',
|
|
52
|
-
interaction: '0x0',
|
|
53
|
-
});
|
|
54
|
-
const limitOrderTypedData = limitOrderBuilder.buildLimitOrderTypedData(
|
|
55
|
-
limitOrder
|
|
56
|
-
);
|
|
57
|
-
const limitOrderSignature = limitOrderBuilder.buildOrderSignature(
|
|
58
|
-
walletAddress,
|
|
59
|
-
limitOrderTypedData
|
|
60
|
-
);
|
|
61
|
-
const limitOrderHash = limitOrderBuilder.buildLimitOrderHash(
|
|
62
|
-
limitOrderTypedData
|
|
63
|
-
);
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
As result you will receive a structure of [limit order](./limit-order-structure.md). Example:
|
|
67
|
-
|
|
68
|
-
```json
|
|
69
|
-
{
|
|
70
|
-
"salt": "1",
|
|
71
|
-
"makerAsset": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
72
|
-
"takerAsset": "0x6b175474e89094c44da98b954eedeac495271d0f",
|
|
73
|
-
"getMakerAmount": "0xf4a215c300000...0000",
|
|
74
|
-
"getTakerAmount": "0x296637bf00000...0000",
|
|
75
|
-
"makerAssetData": "0x23b872dd00000...0000",
|
|
76
|
-
"takerAssetData": "0x23b872dd00000...0000",
|
|
77
|
-
"predicate": "0x961d5b1e0000000000...0000",
|
|
78
|
-
"permit": "0x",
|
|
79
|
-
"interaction": "0x"
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Limit order signature
|
|
84
|
-
|
|
85
|
-
To fill a limit order, you need a typed data structure signature.
|
|
86
|
-
You can create a signature following the example above.
|
|
87
|
-
|
|
88
|
-
But the example uses `Web3ProviderConnector` which is designed to work with a wallet.
|
|
89
|
-
If you need to get the signature on the server side, you can use the `PrivateKeyProviderConnector` and get the signature using the private key.
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
const walletAddress = '0xd337163ef588f2ee7cdd30a3387660019be415c9';
|
|
93
|
-
|
|
94
|
-
const privateKey =
|
|
95
|
-
'd8d1f95deb28949ea0ecc4e9a0decf89e98422c2d76ab6e5f736792a388c56c7';
|
|
96
|
-
const limitOrderTypedData: EIP712TypedData = {
|
|
97
|
-
// ...
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const web3Provider = new Web3('...');
|
|
101
|
-
const privateKeyProviderConnector = new PrivateKeyProviderConnector(
|
|
102
|
-
privateKey,
|
|
103
|
-
web3Provider
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
const signature = await privateKeyProviderConnector.signTypedData(
|
|
107
|
-
walletAddress,
|
|
108
|
-
limitOrderTypedData
|
|
109
|
-
);
|
|
110
|
-
```
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Domain separator
|
|
2
|
-
|
|
3
|
-
[Definition of domainSeparator](https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator)
|
|
4
|
-
|
|
5
|
-
## Example:
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import Web3 from 'web3';
|
|
9
|
-
import {
|
|
10
|
-
LimitOrderProtocolFacade,
|
|
11
|
-
Web3ProviderConnector,
|
|
12
|
-
} from '@1inch/limit-order-protocol';
|
|
13
|
-
|
|
14
|
-
const contractAddress = '0x5fa31604fc5dcebfcac2481f9fa59d174126e5e6';
|
|
15
|
-
const connector = new Web3ProviderConnector(new Web3('...'));
|
|
16
|
-
const limitOrderProtocolFacade = new LimitOrderProtocolFacade(
|
|
17
|
-
contractAddress,
|
|
18
|
-
connector
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const domainSeparator = await limitOrderProtocolFacade.domainSeparator();
|
|
22
|
-
```
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Filling a RFQ order:
|
|
2
|
-
|
|
3
|
-
A RFQ order can be filled in whole or in part.
|
|
4
|
-
|
|
5
|
-
> Important! You can fill in a RFQ order only once!
|
|
6
|
-
|
|
7
|
-
## Parameters:
|
|
8
|
-
|
|
9
|
-
| Field | Description |
|
|
10
|
-
| ------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
-
| `order` | structure of the RFQ order (see [RFQ order structure] ( ./docs/limit-order-rfq-structure.md)) |
|
|
12
|
-
| `signature` | signature of the typed date of the RFQ order (signTypedData_v4) |
|
|
13
|
-
| `makerAmount` | the number of maker asset tokens that you want to fill (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
14
|
-
| `takerAmount` | the number of taker asset tokens that you want to fill (in token units). For example: 5 DAI = 5000000000000000000 units |
|
|
15
|
-
|
|
16
|
-
> important! Only one of the assets amounts can be not zero.
|
|
17
|
-
> For example, if you specified the maker amount, then the taker amount must be zero and vice versa.
|
|
18
|
-
|
|
19
|
-
## Filling with a typescript/javascript:
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import Web3 from 'web3';
|
|
23
|
-
import {
|
|
24
|
-
LimitOrderBuilder,
|
|
25
|
-
LimitOrderProtocolFacade,
|
|
26
|
-
RFQOrder,
|
|
27
|
-
Web3ProviderConnector
|
|
28
|
-
} from '@1inch/limit-order-protocol';
|
|
29
|
-
|
|
30
|
-
const contractAddress = '0x7643b8c2457c1f36dc6e3b8f8e112fdf6da7698a';
|
|
31
|
-
const walletAddress = '0xd337163ef588f2ee7cdd30a3387660019be415c9';
|
|
32
|
-
|
|
33
|
-
const web3 = new Web3('...');
|
|
34
|
-
// You can create and use a custom provider connector (for example: ethers)
|
|
35
|
-
const connector = new Web3ProviderConnector(web3);
|
|
36
|
-
|
|
37
|
-
const limitOrderBuilder = new LimitOrderBuilder(
|
|
38
|
-
contractAddress,
|
|
39
|
-
chainId,
|
|
40
|
-
connector
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const limitOrderProtocolFacade = new LimitOrderProtocolFacade(
|
|
44
|
-
contractAddress,
|
|
45
|
-
connector
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
const RFQorder: RFQOrder = {...};
|
|
49
|
-
|
|
50
|
-
const typedData = limitOrderBuilder.buildRFQOrderTypedData(RFQorder);
|
|
51
|
-
const signature = await limitOrderBuilder.buildOrderSignature(
|
|
52
|
-
walletAddress,
|
|
53
|
-
typedData
|
|
54
|
-
);
|
|
55
|
-
const makerAmount = '1000000000000000000';
|
|
56
|
-
const takerAmount = '0';
|
|
57
|
-
|
|
58
|
-
const callData = limitOrderProtocolFacade.fillRFQOrder(
|
|
59
|
-
order,
|
|
60
|
-
signature,
|
|
61
|
-
makerAmount,
|
|
62
|
-
takerAmount
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
// Send transaction for the order RFQ filling
|
|
66
|
-
// Must be implemented
|
|
67
|
-
sendTransaction({
|
|
68
|
-
from: walletAddress,
|
|
69
|
-
gas: 150_000, // Set your gas limit
|
|
70
|
-
gasPrice: 600000000, // Set your gas price
|
|
71
|
-
to: contractAddress,
|
|
72
|
-
data: callData,
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Filling via CLI (with arguments):
|
|
77
|
-
|
|
78
|
-
`gasPrice` - in units of GWEI
|
|
79
|
-
|
|
80
|
-
```shell
|
|
81
|
-
npx limit-order-rfq-utils --\
|
|
82
|
-
--operation=fill \
|
|
83
|
-
--chainId=56 \
|
|
84
|
-
--privateKey={xxx} \
|
|
85
|
-
--gasPrice=6 \
|
|
86
|
-
--order="{ \
|
|
87
|
-
\"info\": \"29941961886664662336741887180811\", \
|
|
88
|
-
\"makerAsset\": \"0x111111111117dc0aa78b770fa6a738034120c302\", \
|
|
89
|
-
\"takerAsset\": \"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3\", \
|
|
90
|
-
\"makerAssetData\": \"0x23b872dd00...000\", \
|
|
91
|
-
\"takerAssetData\": \"0x23b872dd00...000\" \
|
|
92
|
-
}" \
|
|
93
|
-
--makerAmount=1000000000000000000 \
|
|
94
|
-
--takerAmount=0
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Filling via CLI (through prompt):
|
|
98
|
-
|
|
99
|
-
```shell
|
|
100
|
-
npx limit-order-rfq-utils
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
As result, you will receive a link to the transaction hash.
|