@stryke-xyz/premarket-sdk 1.0.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/abi/AggregationRouterV6.abi.json +1186 -0
- package/dist/abi/NativeOrderFactory.abi.json +291 -0
- package/dist/abi/NativeOrderImpl.abi.json +381 -0
- package/dist/abi/limitOrderProtocol.json +63 -0
- package/dist/address.d.ts +13 -0
- package/dist/address.js +32 -0
- package/dist/api/filler.d.ts +109 -0
- package/dist/api/filler.js +289 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/order-helper.d.ts +59 -0
- package/dist/api/order-helper.js +112 -0
- package/dist/api/orderbook-api.d.ts +36 -0
- package/dist/api/orderbook-api.js +69 -0
- package/dist/bps.d.ts +35 -0
- package/dist/bps.js +52 -0
- package/dist/config/chains.d.ts +50 -0
- package/dist/config/chains.js +21 -0
- package/dist/config/index.d.ts +25 -0
- package/dist/config/index.js +103 -0
- package/dist/config/markets.d.ts +53 -0
- package/dist/config/markets.js +125 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +30 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +21 -0
- package/dist/limit-order/amounts.d.ts +14 -0
- package/dist/limit-order/amounts.js +19 -0
- package/dist/limit-order/eip712/domain.d.ts +10 -0
- package/dist/limit-order/eip712/domain.js +18 -0
- package/dist/limit-order/eip712/eip712.types.d.ts +23 -0
- package/dist/limit-order/eip712/eip712.types.js +1 -0
- package/dist/limit-order/eip712/index.d.ts +3 -0
- package/dist/limit-order/eip712/index.js +3 -0
- package/dist/limit-order/eip712/order-typed-data-builder.d.ts +6 -0
- package/dist/limit-order/eip712/order-typed-data-builder.js +25 -0
- package/dist/limit-order/extensions/extension-builder.d.ts +35 -0
- package/dist/limit-order/extensions/extension-builder.js +83 -0
- package/dist/limit-order/extensions/extension.d.ts +45 -0
- package/dist/limit-order/extensions/extension.js +108 -0
- package/dist/limit-order/extensions/extension.spec.d.ts +1 -0
- package/dist/limit-order/extensions/extension.spec.js +17 -0
- package/dist/limit-order/extensions/fee-taker/errors.d.ts +2 -0
- package/dist/limit-order/extensions/fee-taker/errors.js +2 -0
- package/dist/limit-order/extensions/fee-taker/fee-calculator.d.ts +40 -0
- package/dist/limit-order/extensions/fee-taker/fee-calculator.js +83 -0
- package/dist/limit-order/extensions/fee-taker/fee-calculator.spec.d.ts +1 -0
- package/dist/limit-order/extensions/fee-taker/fee-calculator.spec.js +14 -0
- package/dist/limit-order/extensions/fee-taker/fee-taker.extension.d.ts +130 -0
- package/dist/limit-order/extensions/fee-taker/fee-taker.extension.js +249 -0
- package/dist/limit-order/extensions/fee-taker/fee-taker.extension.spec.d.ts +1 -0
- package/dist/limit-order/extensions/fee-taker/fee-taker.extension.spec.js +72 -0
- package/dist/limit-order/extensions/fee-taker/fees.d.ts +19 -0
- package/dist/limit-order/extensions/fee-taker/fees.js +36 -0
- package/dist/limit-order/extensions/fee-taker/index.d.ts +7 -0
- package/dist/limit-order/extensions/fee-taker/index.js +7 -0
- package/dist/limit-order/extensions/fee-taker/integrator-fee.d.ts +13 -0
- package/dist/limit-order/extensions/fee-taker/integrator-fee.js +28 -0
- package/dist/limit-order/extensions/fee-taker/resolver-fee.d.ts +19 -0
- package/dist/limit-order/extensions/fee-taker/resolver-fee.js +28 -0
- package/dist/limit-order/extensions/fee-taker/types.d.ts +4 -0
- package/dist/limit-order/extensions/fee-taker/types.js +1 -0
- package/dist/limit-order/extensions/fee-taker/whitelist-half-address.d.ts +18 -0
- package/dist/limit-order/extensions/fee-taker/whitelist-half-address.js +26 -0
- package/dist/limit-order/extensions/index.d.ts +3 -0
- package/dist/limit-order/extensions/index.js +3 -0
- package/dist/limit-order/index.d.ts +10 -0
- package/dist/limit-order/index.js +10 -0
- package/dist/limit-order/interaction.d.ts +16 -0
- package/dist/limit-order/interaction.js +25 -0
- package/dist/limit-order/interaction.spec.d.ts +1 -0
- package/dist/limit-order/interaction.spec.js +8 -0
- package/dist/limit-order/limit-order-with-fee.d.ts +59 -0
- package/dist/limit-order/limit-order-with-fee.js +94 -0
- package/dist/limit-order/limit-order-with-fee.spec.d.ts +1 -0
- package/dist/limit-order/limit-order-with-fee.spec.js +31 -0
- package/dist/limit-order/limit-order.d.ts +63 -0
- package/dist/limit-order/limit-order.js +211 -0
- package/dist/limit-order/limit-order.spec.d.ts +1 -0
- package/dist/limit-order/limit-order.spec.js +103 -0
- package/dist/limit-order/maker-traits.d.ts +200 -0
- package/dist/limit-order/maker-traits.js +309 -0
- package/dist/limit-order/maker-traits.spec.d.ts +1 -0
- package/dist/limit-order/maker-traits.spec.js +102 -0
- package/dist/limit-order/source-track.d.ts +1 -0
- package/dist/limit-order/source-track.js +22 -0
- package/dist/limit-order/taker-traits.d.ts +141 -0
- package/dist/limit-order/taker-traits.js +207 -0
- package/dist/limit-order/types.d.ts +24 -0
- package/dist/limit-order/types.js +1 -0
- package/dist/limit-order/verification.d.ts +16 -0
- package/dist/limit-order/verification.js +108 -0
- package/dist/limit-order-contract/index.d.ts +4 -0
- package/dist/limit-order-contract/index.js +4 -0
- package/dist/limit-order-contract/limit-order-contract.d.ts +34 -0
- package/dist/limit-order-contract/limit-order-contract.js +79 -0
- package/dist/limit-order-contract/native-order-factory.d.ts +10 -0
- package/dist/limit-order-contract/native-order-factory.js +22 -0
- package/dist/limit-order-contract/native-order-impl.d.ts +10 -0
- package/dist/limit-order-contract/native-order-impl.js +24 -0
- package/dist/limit-order-contract/proxy-factory.d.ts +20 -0
- package/dist/limit-order-contract/proxy-factory.js +32 -0
- package/dist/limit-order-contract/proxy-factory.spec.d.ts +1 -0
- package/dist/limit-order-contract/proxy-factory.spec.js +16 -0
- package/dist/limit-order-contract/types.d.ts +6 -0
- package/dist/limit-order-contract/types.js +1 -0
- package/dist/ponder/client/index.d.ts +23 -0
- package/dist/ponder/client/index.js +44 -0
- package/dist/ponder/client/queries/markets.d.ts +30 -0
- package/dist/ponder/client/queries/markets.js +200 -0
- package/dist/ponder/client/queries/positions.d.ts +13 -0
- package/dist/ponder/client/queries/positions.js +406 -0
- package/dist/ponder/client/types/history.d.ts +94 -0
- package/dist/ponder/client/types/history.js +1 -0
- package/dist/ponder/client/types/index.d.ts +5 -0
- package/dist/ponder/client/types/index.js +5 -0
- package/dist/ponder/client/types/market.d.ts +45 -0
- package/dist/ponder/client/types/market.js +1 -0
- package/dist/ponder/client/types/position.d.ts +32 -0
- package/dist/ponder/client/types/position.js +1 -0
- package/dist/ponder/client/types/serializers.d.ts +57 -0
- package/dist/ponder/client/types/serializers.js +248 -0
- package/dist/ponder/client/types/user.d.ts +5 -0
- package/dist/ponder/client/types/user.js +1 -0
- package/dist/ponder/client/utils.d.ts +1 -0
- package/dist/ponder/client/utils.js +32 -0
- package/dist/ponder/generated/index.d.ts +18 -0
- package/dist/ponder/generated/index.js +20 -0
- package/dist/ponder/generated/runtime/batcher.d.ts +105 -0
- package/dist/ponder/generated/runtime/batcher.js +188 -0
- package/dist/ponder/generated/runtime/createClient.d.ts +17 -0
- package/dist/ponder/generated/runtime/createClient.js +24 -0
- package/dist/ponder/generated/runtime/error.d.ts +18 -0
- package/dist/ponder/generated/runtime/error.js +15 -0
- package/dist/ponder/generated/runtime/fetcher.d.ts +10 -0
- package/dist/ponder/generated/runtime/fetcher.js +67 -0
- package/dist/ponder/generated/runtime/generateGraphqlOperation.d.ts +30 -0
- package/dist/ponder/generated/runtime/generateGraphqlOperation.js +128 -0
- package/dist/ponder/generated/runtime/index.d.ts +11 -0
- package/dist/ponder/generated/runtime/index.js +10 -0
- package/dist/ponder/generated/runtime/linkTypeMap.d.ts +9 -0
- package/dist/ponder/generated/runtime/linkTypeMap.js +83 -0
- package/dist/ponder/generated/runtime/typeSelection.d.ts +28 -0
- package/dist/ponder/generated/runtime/typeSelection.js +3 -0
- package/dist/ponder/generated/runtime/types.d.ts +55 -0
- package/dist/ponder/generated/runtime/types.js +2 -0
- package/dist/ponder/generated/schema.d.ts +3026 -0
- package/dist/ponder/generated/schema.js +222 -0
- package/dist/ponder/generated/types.d.ts +2393 -0
- package/dist/ponder/generated/types.js +6915 -0
- package/dist/ponder/index.d.ts +2 -0
- package/dist/ponder/index.js +2 -0
- package/dist/ponder/types.d.ts +3 -0
- package/dist/ponder/types.js +1 -0
- package/dist/rfq-order/index.d.ts +1 -0
- package/dist/rfq-order/index.js +1 -0
- package/dist/rfq-order/rfq-order.d.ts +21 -0
- package/dist/rfq-order/rfq-order.js +22 -0
- package/dist/rfq-order/rfq-order.spec.d.ts +1 -0
- package/dist/rfq-order/rfq-order.spec.js +27 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.js +2 -0
- package/dist/shared/types.d.ts +79 -0
- package/dist/shared/types.js +12 -0
- package/dist/shared/utils.d.ts +7 -0
- package/dist/shared/utils.js +19 -0
- package/dist/sync/clients/balance-client.d.ts +41 -0
- package/dist/sync/clients/balance-client.js +139 -0
- package/dist/sync/clients/base-client.d.ts +47 -0
- package/dist/sync/clients/base-client.js +154 -0
- package/dist/sync/clients/order-client.d.ts +18 -0
- package/dist/sync/clients/order-client.js +151 -0
- package/dist/sync/index.d.ts +5 -0
- package/dist/sync/index.js +3 -0
- package/dist/sync/redis-ws-client.d.ts +18 -0
- package/dist/sync/redis-ws-client.js +88 -0
- package/dist/sync/types.d.ts +20 -0
- package/dist/sync/types.js +1 -0
- package/dist/utils/mul-div.d.ts +5 -0
- package/dist/utils/mul-div.js +13 -0
- package/dist/utils/orderUtils.d.ts +19 -0
- package/dist/utils/orderUtils.js +51 -0
- package/dist/utils/rand-bigint.d.ts +1 -0
- package/dist/utils/rand-bigint.js +13 -0
- package/dist/utils/rand-bigint.spec.d.ts +1 -0
- package/dist/utils/rand-bigint.spec.js +11 -0
- package/dist/validations.d.ts +1 -0
- package/dist/validations.js +3 -0
- package/package.json +60 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { LimitOrder } from './limit-order.js';
|
|
2
|
+
import { ExtensionBuilder } from './extensions/extension-builder.js';
|
|
3
|
+
import { MakerTraits } from './maker-traits.js';
|
|
4
|
+
import { Extension } from './extensions/index.js';
|
|
5
|
+
import { Address } from '../address.js';
|
|
6
|
+
import { ProxyFactory } from '../limit-order-contract/index.js';
|
|
7
|
+
describe('Limit Order', () => {
|
|
8
|
+
jest.spyOn(Math, 'random').mockReturnValue(1);
|
|
9
|
+
jest.spyOn(Date, 'now').mockReturnValue(1673549418040);
|
|
10
|
+
it('should create limit order', () => {
|
|
11
|
+
const order = new LimitOrder({
|
|
12
|
+
makerAsset: new Address('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
13
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
14
|
+
makingAmount: 1000000000000000000n,
|
|
15
|
+
takingAmount: 1420000000n,
|
|
16
|
+
maker: new Address('0x00000000219ab540356cbb839cbe05303d7705fa')
|
|
17
|
+
});
|
|
18
|
+
expect(order.receiver).toEqual(Address.ZERO_ADDRESS);
|
|
19
|
+
expect(LimitOrder.fromCalldata(order.toCalldata())).toEqual(order);
|
|
20
|
+
});
|
|
21
|
+
it('should create limit order and set receiver == maker', () => {
|
|
22
|
+
const ext = new ExtensionBuilder().build();
|
|
23
|
+
const order = new LimitOrder({
|
|
24
|
+
makerAsset: new Address('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
25
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
26
|
+
makingAmount: 1000000000000000000n,
|
|
27
|
+
takingAmount: 1420000000n,
|
|
28
|
+
maker: new Address('0x00000000219ab540356cbb839cbe05303d7705fa'),
|
|
29
|
+
salt: LimitOrder.buildSalt(ext)
|
|
30
|
+
}, MakerTraits.default(), ext, { optimizeReceiverAddress: false });
|
|
31
|
+
expect(order.receiver).toEqual(order.maker);
|
|
32
|
+
expect(LimitOrder.fromCalldata(order.toCalldata())).toEqual(order);
|
|
33
|
+
expect(LimitOrder.fromDataAndExtension(order.build(), ext)).toEqual(order);
|
|
34
|
+
});
|
|
35
|
+
it('should create limit order with passed salt', () => {
|
|
36
|
+
const order = new LimitOrder({
|
|
37
|
+
makerAsset: new Address('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
38
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
39
|
+
makingAmount: 1000000000000000000n,
|
|
40
|
+
takingAmount: 1420000000n,
|
|
41
|
+
maker: new Address('0x00000000219ab540356cbb839cbe05303d7705fa'),
|
|
42
|
+
salt: 10n
|
|
43
|
+
});
|
|
44
|
+
expect(LimitOrder.fromCalldata(order.toCalldata())).toEqual(order);
|
|
45
|
+
});
|
|
46
|
+
it('should create limit order with extension and salt', () => {
|
|
47
|
+
const ext = new ExtensionBuilder().withCustomData('0xdeadbeef').build();
|
|
48
|
+
const order = new LimitOrder({
|
|
49
|
+
makerAsset: new Address('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
50
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
51
|
+
makingAmount: 1000000000000000000n,
|
|
52
|
+
takingAmount: 1420000000n,
|
|
53
|
+
maker: new Address('0x00000000219ab540356cbb839cbe05303d7705fa'),
|
|
54
|
+
salt: LimitOrder.buildSalt(ext)
|
|
55
|
+
}, MakerTraits.default(), ext);
|
|
56
|
+
expect(LimitOrder.fromDataAndExtension(order.build(), ext)).toEqual(order);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
describe('Limit Order Native', () => {
|
|
60
|
+
jest.spyOn(Math, 'random').mockReturnValue(1);
|
|
61
|
+
jest.spyOn(Date, 'now').mockReturnValue(1673549418040);
|
|
62
|
+
it('should correct detect that order is from native asset', () => {
|
|
63
|
+
const nativeOrderFactory = new ProxyFactory(Address.fromBigInt(228n), Address.fromBigInt(2n));
|
|
64
|
+
const maker = new Address('0x00000000219ab540356cbb839cbe05303d7705fa');
|
|
65
|
+
const nativeOrder = LimitOrder.fromNative(1, nativeOrderFactory, {
|
|
66
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
67
|
+
makingAmount: 1000000000000000000n,
|
|
68
|
+
takingAmount: 1420000000n,
|
|
69
|
+
maker,
|
|
70
|
+
salt: 10n
|
|
71
|
+
}, MakerTraits.default().withExtension(), Extension.default());
|
|
72
|
+
expect(nativeOrder.receiver).toEqual(maker);
|
|
73
|
+
expect(nativeOrder.isNative(1, nativeOrderFactory, nativeOrder.nativeSignature(maker))).toEqual(true);
|
|
74
|
+
expect(LimitOrder.fromDataAndExtension(nativeOrder.build(), nativeOrder.extension).isNative(1, nativeOrderFactory, nativeOrder.nativeSignature(maker))).toEqual(true);
|
|
75
|
+
});
|
|
76
|
+
it('should correct detect that order is from native asset (no salt)', () => {
|
|
77
|
+
const nativeOrderFactory = new ProxyFactory(Address.fromBigInt(228n), Address.fromBigInt(2n));
|
|
78
|
+
const maker = new Address('0x00000000219ab540356cbb839cbe05303d7705fa');
|
|
79
|
+
const nativeOrder = LimitOrder.fromNative(1, nativeOrderFactory, {
|
|
80
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
81
|
+
makingAmount: 1000000000000000000n,
|
|
82
|
+
takingAmount: 1420000000n,
|
|
83
|
+
maker
|
|
84
|
+
}, MakerTraits.default().withExtension(), Extension.default());
|
|
85
|
+
expect(nativeOrder.receiver).toEqual(maker);
|
|
86
|
+
expect(nativeOrder.isNative(1, nativeOrderFactory, nativeOrder.nativeSignature(maker))).toEqual(true);
|
|
87
|
+
expect(LimitOrder.fromDataAndExtension(nativeOrder.build(), nativeOrder.extension).isNative(1, nativeOrderFactory, nativeOrder.nativeSignature(maker))).toEqual(true);
|
|
88
|
+
});
|
|
89
|
+
it('should correct detect that order is NOT from native asset', () => {
|
|
90
|
+
const nativeOrderFactory = new ProxyFactory(Address.fromBigInt(228n), Address.fromBigInt(2n));
|
|
91
|
+
const maker = new Address('0x00000000219ab540356cbb839cbe05303d7705fa');
|
|
92
|
+
const order = new LimitOrder({
|
|
93
|
+
makerAsset: new Address('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
94
|
+
takerAsset: new Address('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),
|
|
95
|
+
makingAmount: 1000000000000000000n,
|
|
96
|
+
takingAmount: 1420000000n,
|
|
97
|
+
maker
|
|
98
|
+
});
|
|
99
|
+
expect(order.receiver).toEqual(Address.ZERO_ADDRESS);
|
|
100
|
+
expect(order.isNative(1, nativeOrderFactory, order.nativeSignature(maker))).toEqual(false);
|
|
101
|
+
expect(LimitOrder.fromDataAndExtension(order.build(), order.extension).isNative(1, nativeOrderFactory, order.nativeSignature(maker))).toEqual(false);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { Address } from '../address.js';
|
|
2
|
+
/**
|
|
3
|
+
* The MakerTraits type is an uint256, and different parts of the number are used to encode different traits.
|
|
4
|
+
* High bits are used for flags
|
|
5
|
+
* 255 bit `NO_PARTIAL_FILLS_FLAG` - if set, the order does not allow partial fills
|
|
6
|
+
* 254 bit `ALLOW_MULTIPLE_FILLS_FLAG` - if set, the order permits multiple fills
|
|
7
|
+
* 253 bit - unused
|
|
8
|
+
* 252 bit `PRE_INTERACTION_CALL_FLAG` - if set, the order requires pre-interaction call
|
|
9
|
+
* 251 bit `POST_INTERACTION_CALL_FLAG` - if set, the order requires post-interaction call
|
|
10
|
+
* 250 bit `NEED_CHECK_EPOCH_MANAGER_FLAG` - if set, the order requires to check the epoch manager
|
|
11
|
+
* 249 bit `HAS_EXTENSION_FLAG` - if set, the order has extension(s)
|
|
12
|
+
* 248 bit `USE_PERMIT2_FLAG` - if set, the order uses permit2
|
|
13
|
+
* 247 bit `UNWRAP_WETH_FLAG` - if set, the order requires to unwrap WETH
|
|
14
|
+
*
|
|
15
|
+
* Low 200 bits are used for allowed sender, expiration, nonceOrEpoch, and series
|
|
16
|
+
* uint80 last 10 bytes of allowed sender address (0 if any)
|
|
17
|
+
* uint40 expiration timestamp (0 if none)
|
|
18
|
+
* uint40 nonce or epoch
|
|
19
|
+
* uint40 series
|
|
20
|
+
*/
|
|
21
|
+
export declare class MakerTraits {
|
|
22
|
+
private static ALLOWED_SENDER_MASK;
|
|
23
|
+
private static EXPIRATION_MASK;
|
|
24
|
+
private static NONCE_OR_EPOCH_MASK;
|
|
25
|
+
private static SERIES_MASK;
|
|
26
|
+
private static NO_PARTIAL_FILLS_FLAG;
|
|
27
|
+
private static ALLOW_MULTIPLE_FILLS_FLAG;
|
|
28
|
+
private static PRE_INTERACTION_CALL_FLAG;
|
|
29
|
+
private static POST_INTERACTION_CALL_FLAG;
|
|
30
|
+
private static NEED_CHECK_EPOCH_MANAGER_FLAG;
|
|
31
|
+
private static HAS_EXTENSION_FLAG;
|
|
32
|
+
private static USE_PERMIT2_FLAG;
|
|
33
|
+
private static UNWRAP_WETH_FLAG;
|
|
34
|
+
private value;
|
|
35
|
+
constructor(val: bigint);
|
|
36
|
+
static default(): MakerTraits;
|
|
37
|
+
/**
|
|
38
|
+
* Last 10bytes of address
|
|
39
|
+
*/
|
|
40
|
+
allowedSender(): string;
|
|
41
|
+
isPrivate(): boolean;
|
|
42
|
+
withAllowedSender(sender: Address): this;
|
|
43
|
+
/**
|
|
44
|
+
* Removes `sender` check on contract
|
|
45
|
+
*/
|
|
46
|
+
withAnySender(): this;
|
|
47
|
+
/**
|
|
48
|
+
* If null is return than order has no expiration
|
|
49
|
+
*/
|
|
50
|
+
expiration(): bigint | null;
|
|
51
|
+
/**
|
|
52
|
+
* Set order expiration time
|
|
53
|
+
*
|
|
54
|
+
* @param expiration expiration timestamp in sec
|
|
55
|
+
*/
|
|
56
|
+
withExpiration(expiration: bigint): this;
|
|
57
|
+
/**
|
|
58
|
+
* Returns epoch in case `isEpochManagerEnabled()` and nonce otherwise
|
|
59
|
+
*/
|
|
60
|
+
nonceOrEpoch(): bigint;
|
|
61
|
+
/**
|
|
62
|
+
* Set nonce
|
|
63
|
+
* Note: nonce and epoch share the same field, so they cant be set together
|
|
64
|
+
* @param nonce must be less or equal to `uint40::max`
|
|
65
|
+
*/
|
|
66
|
+
withNonce(nonce: bigint): this;
|
|
67
|
+
/**
|
|
68
|
+
* Enable epoch manager check
|
|
69
|
+
*
|
|
70
|
+
* If set, the contract will check that order epoch equals to epoch on `SeriesEpochManager` contract
|
|
71
|
+
* Note: epoch manager can be used only when `partialFills` AND `multipleFills` allowed
|
|
72
|
+
* Note: nonce and epoch share the same field, so they cant be set together
|
|
73
|
+
*
|
|
74
|
+
* @param series subgroup for epoch
|
|
75
|
+
* @param epoch unique order id inside series
|
|
76
|
+
* @see https://github.com/1inch/limit-order-protocol/blob/23d655844191dea7960a186652307604a1ed480a/contracts/helpers/SeriesEpochManager.sol#L6
|
|
77
|
+
*/
|
|
78
|
+
withEpoch(series: bigint, epoch: bigint): this;
|
|
79
|
+
/**
|
|
80
|
+
* Get current series
|
|
81
|
+
*/
|
|
82
|
+
series(): bigint;
|
|
83
|
+
/**
|
|
84
|
+
* Returns true if order has an extension and false otherwise
|
|
85
|
+
*/
|
|
86
|
+
hasExtension(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Mark that order has an extension
|
|
89
|
+
*/
|
|
90
|
+
withExtension(): this;
|
|
91
|
+
/**
|
|
92
|
+
* Is partial fills allowed for order
|
|
93
|
+
*/
|
|
94
|
+
isPartialFillAllowed(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Disable partial fills for order
|
|
97
|
+
*/
|
|
98
|
+
disablePartialFills(): this;
|
|
99
|
+
/**
|
|
100
|
+
* Allow partial fills for order
|
|
101
|
+
*/
|
|
102
|
+
allowPartialFills(): this;
|
|
103
|
+
/**
|
|
104
|
+
* Set partial fill flag to passed value
|
|
105
|
+
*/
|
|
106
|
+
setPartialFills(val: boolean): this;
|
|
107
|
+
/**
|
|
108
|
+
* Returns true if order allowing more than one fill and false otherwise
|
|
109
|
+
*/
|
|
110
|
+
isMultipleFillsAllowed(): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Allow many fills for order
|
|
113
|
+
*/
|
|
114
|
+
allowMultipleFills(): this;
|
|
115
|
+
/**
|
|
116
|
+
* Allow at max 1 fill for order
|
|
117
|
+
*/
|
|
118
|
+
disableMultipleFills(): this;
|
|
119
|
+
/**
|
|
120
|
+
* If `val` is true, then multiple fills allowed, otherwise disallowed
|
|
121
|
+
*/
|
|
122
|
+
setMultipleFills(val: boolean): this;
|
|
123
|
+
/**
|
|
124
|
+
* Returns true if maker has pre-interaction and false otherwise
|
|
125
|
+
*/
|
|
126
|
+
hasPreInteraction(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Enable maker pre-interaction
|
|
129
|
+
*/
|
|
130
|
+
enablePreInteraction(): this;
|
|
131
|
+
/**
|
|
132
|
+
* Disable maker pre-interaction
|
|
133
|
+
*/
|
|
134
|
+
disablePreInteraction(): this;
|
|
135
|
+
/**
|
|
136
|
+
* Returns true if maker has post-interaction and false otherwise
|
|
137
|
+
*/
|
|
138
|
+
hasPostInteraction(): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Enable maker post-interaction
|
|
141
|
+
*/
|
|
142
|
+
enablePostInteraction(): this;
|
|
143
|
+
/**
|
|
144
|
+
* Disable maker post-interaction
|
|
145
|
+
*/
|
|
146
|
+
disablePostInteraction(): this;
|
|
147
|
+
/**
|
|
148
|
+
* Returns true if epoch manager enabled
|
|
149
|
+
*
|
|
150
|
+
* @see MakerTraits.enableEpochManagerCheck
|
|
151
|
+
*/
|
|
152
|
+
isEpochManagerEnabled(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Returns true if `permit2` enabled for maker funds transfer
|
|
155
|
+
*
|
|
156
|
+
* @see https://github.com/Uniswap/permit2
|
|
157
|
+
*/
|
|
158
|
+
isPermit2(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Use `permit2` to transfer maker funds to contract
|
|
161
|
+
*
|
|
162
|
+
* @see https://github.com/Uniswap/permit2
|
|
163
|
+
*/
|
|
164
|
+
enablePermit2(): this;
|
|
165
|
+
/**
|
|
166
|
+
* Do not use `permit2` to transfer maker funds to contract
|
|
167
|
+
*
|
|
168
|
+
* @see https://github.com/Uniswap/permit2
|
|
169
|
+
*/
|
|
170
|
+
disablePermit2(): this;
|
|
171
|
+
/**
|
|
172
|
+
* Is WRAPPED token will be unwrapped to NATIVE before sending to maker
|
|
173
|
+
*/
|
|
174
|
+
isNativeUnwrapEnabled(): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Unwrap WRAPPED token to NATIVE before sending it to maker
|
|
177
|
+
*/
|
|
178
|
+
enableNativeUnwrap(): this;
|
|
179
|
+
/**
|
|
180
|
+
* Do not unwrap WRAPPED token to NATIVE before sending it to maker
|
|
181
|
+
*/
|
|
182
|
+
disableNativeUnwrap(): this;
|
|
183
|
+
asBigInt(): bigint;
|
|
184
|
+
/**
|
|
185
|
+
* Returns true if bit invalidator mode is used to invalidate order (cancel/mark as filled)
|
|
186
|
+
*
|
|
187
|
+
* Bit invalidator is cheaper in terms of gas, but can be used only when partial fills OR multiple fills are disabled
|
|
188
|
+
*
|
|
189
|
+
* @see https://github.com/1inch/limit-order-protocol/blob/3c9b8ab8bbc4c10ff8d615fc3d33f501993c292d/contracts/libraries/MakerTraitsLib.sol#L142
|
|
190
|
+
*/
|
|
191
|
+
isBitInvalidatorMode(): boolean;
|
|
192
|
+
private enableEpochManagerCheck;
|
|
193
|
+
/**
|
|
194
|
+
* Set series. Only when epoch manager enabled
|
|
195
|
+
* Series is a subgroup for epoch's, it can be useful when you want to cancel a group of orders at once
|
|
196
|
+
*
|
|
197
|
+
* @see MakerTraits.enableEpochManagerCheck
|
|
198
|
+
*/
|
|
199
|
+
private setSeries;
|
|
200
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { add0x, BitMask, BN } from '@1inch/byte-utils';
|
|
2
|
+
import assert from 'assert';
|
|
3
|
+
/**
|
|
4
|
+
* The MakerTraits type is an uint256, and different parts of the number are used to encode different traits.
|
|
5
|
+
* High bits are used for flags
|
|
6
|
+
* 255 bit `NO_PARTIAL_FILLS_FLAG` - if set, the order does not allow partial fills
|
|
7
|
+
* 254 bit `ALLOW_MULTIPLE_FILLS_FLAG` - if set, the order permits multiple fills
|
|
8
|
+
* 253 bit - unused
|
|
9
|
+
* 252 bit `PRE_INTERACTION_CALL_FLAG` - if set, the order requires pre-interaction call
|
|
10
|
+
* 251 bit `POST_INTERACTION_CALL_FLAG` - if set, the order requires post-interaction call
|
|
11
|
+
* 250 bit `NEED_CHECK_EPOCH_MANAGER_FLAG` - if set, the order requires to check the epoch manager
|
|
12
|
+
* 249 bit `HAS_EXTENSION_FLAG` - if set, the order has extension(s)
|
|
13
|
+
* 248 bit `USE_PERMIT2_FLAG` - if set, the order uses permit2
|
|
14
|
+
* 247 bit `UNWRAP_WETH_FLAG` - if set, the order requires to unwrap WETH
|
|
15
|
+
*
|
|
16
|
+
* Low 200 bits are used for allowed sender, expiration, nonceOrEpoch, and series
|
|
17
|
+
* uint80 last 10 bytes of allowed sender address (0 if any)
|
|
18
|
+
* uint40 expiration timestamp (0 if none)
|
|
19
|
+
* uint40 nonce or epoch
|
|
20
|
+
* uint40 series
|
|
21
|
+
*/
|
|
22
|
+
export class MakerTraits {
|
|
23
|
+
constructor(val) {
|
|
24
|
+
this.value = new BN(val);
|
|
25
|
+
}
|
|
26
|
+
static default() {
|
|
27
|
+
return new MakerTraits(0n);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Last 10bytes of address
|
|
31
|
+
*/
|
|
32
|
+
allowedSender() {
|
|
33
|
+
return this.value
|
|
34
|
+
.getMask(MakerTraits.ALLOWED_SENDER_MASK)
|
|
35
|
+
.value.toString(16)
|
|
36
|
+
.padStart(20, '0');
|
|
37
|
+
}
|
|
38
|
+
isPrivate() {
|
|
39
|
+
return this.value.getMask(MakerTraits.ALLOWED_SENDER_MASK).value !== 0n;
|
|
40
|
+
}
|
|
41
|
+
withAllowedSender(sender) {
|
|
42
|
+
assert(!sender.isZero(), 'Use withAnySender() to remove sender check');
|
|
43
|
+
const lastHalf = add0x(sender.toString().slice(-20));
|
|
44
|
+
this.value = this.value.setMask(MakerTraits.ALLOWED_SENDER_MASK, BigInt(lastHalf));
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Removes `sender` check on contract
|
|
49
|
+
*/
|
|
50
|
+
withAnySender() {
|
|
51
|
+
this.value = this.value.setMask(MakerTraits.ALLOWED_SENDER_MASK, BigInt(0));
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* If null is return than order has no expiration
|
|
56
|
+
*/
|
|
57
|
+
expiration() {
|
|
58
|
+
const timestampSec = this.value.getMask(MakerTraits.EXPIRATION_MASK);
|
|
59
|
+
if (timestampSec.isZero()) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return timestampSec.value;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Set order expiration time
|
|
66
|
+
*
|
|
67
|
+
* @param expiration expiration timestamp in sec
|
|
68
|
+
*/
|
|
69
|
+
withExpiration(expiration) {
|
|
70
|
+
const expirationSec = expiration === null ? 0n : expiration;
|
|
71
|
+
this.value = this.value.setMask(MakerTraits.EXPIRATION_MASK, expirationSec);
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns epoch in case `isEpochManagerEnabled()` and nonce otherwise
|
|
76
|
+
*/
|
|
77
|
+
nonceOrEpoch() {
|
|
78
|
+
return this.value.getMask(MakerTraits.NONCE_OR_EPOCH_MASK).value;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Set nonce
|
|
82
|
+
* Note: nonce and epoch share the same field, so they cant be set together
|
|
83
|
+
* @param nonce must be less or equal to `uint40::max`
|
|
84
|
+
*/
|
|
85
|
+
withNonce(nonce) {
|
|
86
|
+
this.value = this.value.setMask(MakerTraits.NONCE_OR_EPOCH_MASK, nonce);
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Enable epoch manager check
|
|
91
|
+
*
|
|
92
|
+
* If set, the contract will check that order epoch equals to epoch on `SeriesEpochManager` contract
|
|
93
|
+
* Note: epoch manager can be used only when `partialFills` AND `multipleFills` allowed
|
|
94
|
+
* Note: nonce and epoch share the same field, so they cant be set together
|
|
95
|
+
*
|
|
96
|
+
* @param series subgroup for epoch
|
|
97
|
+
* @param epoch unique order id inside series
|
|
98
|
+
* @see https://github.com/1inch/limit-order-protocol/blob/23d655844191dea7960a186652307604a1ed480a/contracts/helpers/SeriesEpochManager.sol#L6
|
|
99
|
+
*/
|
|
100
|
+
withEpoch(series, epoch) {
|
|
101
|
+
this.setSeries(series);
|
|
102
|
+
this.enableEpochManagerCheck();
|
|
103
|
+
return this.withNonce(epoch);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get current series
|
|
107
|
+
*/
|
|
108
|
+
series() {
|
|
109
|
+
return this.value.getMask(MakerTraits.SERIES_MASK).value;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns true if order has an extension and false otherwise
|
|
113
|
+
*/
|
|
114
|
+
hasExtension() {
|
|
115
|
+
return this.value.getBit(MakerTraits.HAS_EXTENSION_FLAG) === 1;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Mark that order has an extension
|
|
119
|
+
*/
|
|
120
|
+
withExtension() {
|
|
121
|
+
this.value = this.value.setBit(MakerTraits.HAS_EXTENSION_FLAG, 1);
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Is partial fills allowed for order
|
|
126
|
+
*/
|
|
127
|
+
isPartialFillAllowed() {
|
|
128
|
+
return this.value.getBit(MakerTraits.NO_PARTIAL_FILLS_FLAG) === 0;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Disable partial fills for order
|
|
132
|
+
*/
|
|
133
|
+
disablePartialFills() {
|
|
134
|
+
this.value = this.value.setBit(MakerTraits.NO_PARTIAL_FILLS_FLAG, 1);
|
|
135
|
+
return this;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Allow partial fills for order
|
|
139
|
+
*/
|
|
140
|
+
allowPartialFills() {
|
|
141
|
+
this.value = this.value.setBit(MakerTraits.NO_PARTIAL_FILLS_FLAG, 0);
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Set partial fill flag to passed value
|
|
146
|
+
*/
|
|
147
|
+
setPartialFills(val) {
|
|
148
|
+
return val ? this.allowPartialFills() : this.disablePartialFills();
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Returns true if order allowing more than one fill and false otherwise
|
|
152
|
+
*/
|
|
153
|
+
isMultipleFillsAllowed() {
|
|
154
|
+
return this.value.getBit(MakerTraits.ALLOW_MULTIPLE_FILLS_FLAG) === 1;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Allow many fills for order
|
|
158
|
+
*/
|
|
159
|
+
allowMultipleFills() {
|
|
160
|
+
this.value = this.value.setBit(MakerTraits.ALLOW_MULTIPLE_FILLS_FLAG, 1);
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Allow at max 1 fill for order
|
|
165
|
+
*/
|
|
166
|
+
disableMultipleFills() {
|
|
167
|
+
this.value = this.value.setBit(MakerTraits.ALLOW_MULTIPLE_FILLS_FLAG, 0);
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* If `val` is true, then multiple fills allowed, otherwise disallowed
|
|
172
|
+
*/
|
|
173
|
+
setMultipleFills(val) {
|
|
174
|
+
return val ? this.allowMultipleFills() : this.disableMultipleFills();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Returns true if maker has pre-interaction and false otherwise
|
|
178
|
+
*/
|
|
179
|
+
hasPreInteraction() {
|
|
180
|
+
return this.value.getBit(MakerTraits.PRE_INTERACTION_CALL_FLAG) === 1;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Enable maker pre-interaction
|
|
184
|
+
*/
|
|
185
|
+
enablePreInteraction() {
|
|
186
|
+
this.value = this.value.setBit(MakerTraits.PRE_INTERACTION_CALL_FLAG, 1);
|
|
187
|
+
return this;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Disable maker pre-interaction
|
|
191
|
+
*/
|
|
192
|
+
disablePreInteraction() {
|
|
193
|
+
this.value = this.value.setBit(MakerTraits.PRE_INTERACTION_CALL_FLAG, 0);
|
|
194
|
+
return this;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Returns true if maker has post-interaction and false otherwise
|
|
198
|
+
*/
|
|
199
|
+
hasPostInteraction() {
|
|
200
|
+
return this.value.getBit(MakerTraits.POST_INTERACTION_CALL_FLAG) === 1;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Enable maker post-interaction
|
|
204
|
+
*/
|
|
205
|
+
enablePostInteraction() {
|
|
206
|
+
this.value = this.value.setBit(MakerTraits.POST_INTERACTION_CALL_FLAG, 1);
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Disable maker post-interaction
|
|
211
|
+
*/
|
|
212
|
+
disablePostInteraction() {
|
|
213
|
+
this.value = this.value.setBit(MakerTraits.POST_INTERACTION_CALL_FLAG, 0);
|
|
214
|
+
return this;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Returns true if epoch manager enabled
|
|
218
|
+
*
|
|
219
|
+
* @see MakerTraits.enableEpochManagerCheck
|
|
220
|
+
*/
|
|
221
|
+
isEpochManagerEnabled() {
|
|
222
|
+
return (this.value.getBit(MakerTraits.NEED_CHECK_EPOCH_MANAGER_FLAG) === 1);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Returns true if `permit2` enabled for maker funds transfer
|
|
226
|
+
*
|
|
227
|
+
* @see https://github.com/Uniswap/permit2
|
|
228
|
+
*/
|
|
229
|
+
isPermit2() {
|
|
230
|
+
return this.value.getBit(MakerTraits.USE_PERMIT2_FLAG) === 1;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Use `permit2` to transfer maker funds to contract
|
|
234
|
+
*
|
|
235
|
+
* @see https://github.com/Uniswap/permit2
|
|
236
|
+
*/
|
|
237
|
+
enablePermit2() {
|
|
238
|
+
this.value = this.value.setBit(MakerTraits.USE_PERMIT2_FLAG, 1);
|
|
239
|
+
return this;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Do not use `permit2` to transfer maker funds to contract
|
|
243
|
+
*
|
|
244
|
+
* @see https://github.com/Uniswap/permit2
|
|
245
|
+
*/
|
|
246
|
+
disablePermit2() {
|
|
247
|
+
this.value = this.value.setBit(MakerTraits.USE_PERMIT2_FLAG, 0);
|
|
248
|
+
return this;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Is WRAPPED token will be unwrapped to NATIVE before sending to maker
|
|
252
|
+
*/
|
|
253
|
+
isNativeUnwrapEnabled() {
|
|
254
|
+
return this.value.getBit(MakerTraits.UNWRAP_WETH_FLAG) === 1;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Unwrap WRAPPED token to NATIVE before sending it to maker
|
|
258
|
+
*/
|
|
259
|
+
enableNativeUnwrap() {
|
|
260
|
+
this.value = this.value.setBit(MakerTraits.UNWRAP_WETH_FLAG, 1);
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Do not unwrap WRAPPED token to NATIVE before sending it to maker
|
|
265
|
+
*/
|
|
266
|
+
disableNativeUnwrap() {
|
|
267
|
+
this.value = this.value.setBit(MakerTraits.UNWRAP_WETH_FLAG, 0);
|
|
268
|
+
return this;
|
|
269
|
+
}
|
|
270
|
+
asBigInt() {
|
|
271
|
+
return this.value.value;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Returns true if bit invalidator mode is used to invalidate order (cancel/mark as filled)
|
|
275
|
+
*
|
|
276
|
+
* Bit invalidator is cheaper in terms of gas, but can be used only when partial fills OR multiple fills are disabled
|
|
277
|
+
*
|
|
278
|
+
* @see https://github.com/1inch/limit-order-protocol/blob/3c9b8ab8bbc4c10ff8d615fc3d33f501993c292d/contracts/libraries/MakerTraitsLib.sol#L142
|
|
279
|
+
*/
|
|
280
|
+
isBitInvalidatorMode() {
|
|
281
|
+
return !this.isPartialFillAllowed() || !this.isMultipleFillsAllowed();
|
|
282
|
+
}
|
|
283
|
+
enableEpochManagerCheck() {
|
|
284
|
+
assert(!this.isBitInvalidatorMode(), 'Epoch manager allowed only when partialFills and multipleFills enabled');
|
|
285
|
+
this.value = this.value.setBit(MakerTraits.NEED_CHECK_EPOCH_MANAGER_FLAG, 1);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Set series. Only when epoch manager enabled
|
|
289
|
+
* Series is a subgroup for epoch's, it can be useful when you want to cancel a group of orders at once
|
|
290
|
+
*
|
|
291
|
+
* @see MakerTraits.enableEpochManagerCheck
|
|
292
|
+
*/
|
|
293
|
+
setSeries(series) {
|
|
294
|
+
this.value = this.value.setMask(MakerTraits.SERIES_MASK, series);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
// Low 200 bits are used for allowed sender, expiration, nonceOrEpoch, and series
|
|
298
|
+
MakerTraits.ALLOWED_SENDER_MASK = new BitMask(0n, 80n);
|
|
299
|
+
MakerTraits.EXPIRATION_MASK = new BitMask(80n, 120n);
|
|
300
|
+
MakerTraits.NONCE_OR_EPOCH_MASK = new BitMask(120n, 160n);
|
|
301
|
+
MakerTraits.SERIES_MASK = new BitMask(160n, 200n);
|
|
302
|
+
MakerTraits.NO_PARTIAL_FILLS_FLAG = 255n;
|
|
303
|
+
MakerTraits.ALLOW_MULTIPLE_FILLS_FLAG = 254n;
|
|
304
|
+
MakerTraits.PRE_INTERACTION_CALL_FLAG = 252n;
|
|
305
|
+
MakerTraits.POST_INTERACTION_CALL_FLAG = 251n;
|
|
306
|
+
MakerTraits.NEED_CHECK_EPOCH_MANAGER_FLAG = 250n;
|
|
307
|
+
MakerTraits.HAS_EXTENSION_FLAG = 249n;
|
|
308
|
+
MakerTraits.USE_PERMIT2_FLAG = 248n;
|
|
309
|
+
MakerTraits.UNWRAP_WETH_FLAG = 247n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|