@orbs-network/spot 2.3.3 → 2.4.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/README.md +146 -136
- package/config.json +2 -2
- package/index.html +16 -10
- package/index.js +1 -1
- package/package.json +11 -18
- package/SKILL.md +0 -63
- package/manifest.json +0 -63
- package/mcp/stdio.mjs +0 -219
- package/out/00_DeployWM.s.sol/DeployWM.json +0 -1
- package/out/00_UpdateWMWhitelist.s.sol/UpdateWMWhitelist.json +0 -1
- package/out/01_DeployRepermit.s.sol/DeployRepermit.json +0 -1
- package/out/02_DeployCosigner.s.sol/DeployCosigner.json +0 -1
- package/out/03_DeployReactor.s.sol/DeployReactor.json +0 -1
- package/out/04_DeployExecutor.s.sol/DeployExecutor.json +0 -1
- package/out/05_DeployRefinery.s.sol/DeployRefinery.json +0 -1
- package/out/06_DeployDefaultAdapter.s.sol/DeployDefaultAdapter.json +0 -1
- package/out/06_DeployDelegatingAdapter.s.sol/DeployDelegatingAdapter.json +0 -1
- package/out/06_DeployP2Adapter.s.sol/DeployP2Adapter.json +0 -1
- package/out/06_DeployParaswapAdapter.s.sol/DeployParaswapAdapter.json +0 -1
- package/out/06_DeployUniversalAdapter.s.sol/DeployUniversalAdapter.json +0 -1
- package/out/AbstractSigner.sol/AbstractSigner.json +0 -1
- package/out/Address.sol/Address.json +0 -1
- package/out/Base.sol/CommonBase.json +0 -1
- package/out/Base.sol/ScriptBase.json +0 -1
- package/out/Base.sol/TestBase.json +0 -1
- package/out/BaseTest.sol/BaseTest.json +0 -1
- package/out/Bytes.sol/Bytes.json +0 -1
- package/out/Constants.sol/Constants.json +0 -1
- package/out/Context.sol/Context.json +0 -1
- package/out/CosignatureLib.sol/CosignatureLib.json +0 -1
- package/out/CosignatureLib.t.sol/CosignatureLibTest.json +0 -1
- package/out/Cosigner.sol/Cosigner.json +0 -1
- package/out/Cosigner.t.sol/CosignerTest.json +0 -1
- package/out/Cosigner.t.sol/CosignerWrapper.json +0 -1
- package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.json +0 -1
- package/out/DefaultDexAdapter.sol/DefaultDexAdapter.json +0 -1
- package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.json +0 -1
- package/out/DelegatingAdapter.sol/DelegatingAdapter.json +0 -1
- package/out/DelegatingAdapter.t.sol/DelegatingAdapterTest.json +0 -1
- package/out/DelegatingAdapter.t.sol/MockDelegateTarget.json +0 -1
- package/out/ECDSA.sol/ECDSA.json +0 -1
- package/out/EIP712.sol/EIP712.json +0 -1
- package/out/ERC20.sol/ERC20.json +0 -1
- package/out/ERC20Mock.sol/ERC20Mock.json +0 -1
- package/out/ERC20Mock6Decimals.sol/ERC20Mock6Decimals.json +0 -1
- package/out/EpochLib.sol/EpochLib.json +0 -1
- package/out/EpochLib.t.sol/EpochLibTest.json +0 -1
- package/out/Errors.sol/Errors.json +0 -1
- package/out/ExclusivityOverrideLib.sol/ExclusivityOverrideLib.json +0 -1
- package/out/ExclusivityOverrideLib.t.sol/ExclusivityCaller.json +0 -1
- package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.json +0 -1
- package/out/Executor.sol/Executor.json +0 -1
- package/out/Executor.t.sol/ExecutorTest.json +0 -1
- package/out/FeeOnTransferERC20Mock.sol/FeeOnTransferERC20Mock.json +0 -1
- package/out/ICommitteeSync.sol/ICommitteeSync.json +0 -1
- package/out/IEIP712.sol/IEIP712.json +0 -1
- package/out/IERC1271.sol/IERC1271.json +0 -1
- package/out/IERC1363.sol/IERC1363.json +0 -1
- package/out/IERC165.sol/IERC165.json +0 -1
- package/out/IERC20.sol/IERC20.json +0 -1
- package/out/IERC20Metadata.sol/IERC20Metadata.json +0 -1
- package/out/IERC5267.sol/IERC5267.json +0 -1
- package/out/IERC7913.sol/IERC7913SignatureVerifier.json +0 -1
- package/out/IExchangeAdapter.sol/IExchangeAdapter.json +0 -1
- package/out/IMulticall3.sol/IMulticall3.json +0 -1
- package/out/IParaswapAugustus.sol/IParaswapAugustus.json +0 -1
- package/out/IPermit2.sol/IPermit2.json +0 -1
- package/out/IReactor.sol/IReactor.json +0 -1
- package/out/IReactorCallback.sol/IReactorCallback.json +0 -1
- package/out/IWM.sol/IWM.json +0 -1
- package/out/IWrappedNative.sol/IWrappedNative.json +0 -1
- package/out/LowLevelCall.sol/LowLevelCall.json +0 -1
- package/out/Math.sol/Math.json +0 -1
- package/out/MessageHashUtils.sol/MessageHashUtils.json +0 -1
- package/out/MockCommitteeSync.sol/MockCommitteeSync.json +0 -1
- package/out/MockDexRouter.sol/MockDexRouter.json +0 -1
- package/out/MockParaswap.sol/MockParaswapAugustus.json +0 -1
- package/out/MockParaswap.sol/MockTokenTransferProxy.json +0 -1
- package/out/MockPermit2.sol/MockPermit2.json +0 -1
- package/out/MockReactor.sol/MockReactor.json +0 -1
- package/out/Multicall3Lib.sol/Multicall3Lib.json +0 -1
- package/out/OrderLib.sol/OrderLib.json +0 -1
- package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.json +0 -1
- package/out/OrderReactor.sol/OrderReactor.json +0 -1
- package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.json +0 -1
- package/out/OrderReactorPause.t.sol/SimpleCallback.json +0 -1
- package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.json +0 -1
- package/out/OrderValidationLib.sol/OrderValidationLib.json +0 -1
- package/out/OrderValidationLib.t.sol/OrderValidationLibTest.json +0 -1
- package/out/Ownable.sol/Ownable.json +0 -1
- package/out/Ownable2Step.sol/Ownable2Step.json +0 -1
- package/out/P2DexAdapter.sol/P2DexAdapter.json +0 -1
- package/out/P2DexAdapter.t.sol/P2DexAdapterTest.json +0 -1
- package/out/Panic.sol/Panic.json +0 -1
- package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.json +0 -1
- package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.json +0 -1
- package/out/Pausable.sol/Pausable.json +0 -1
- package/out/RePermit.sol/RePermit.json +0 -1
- package/out/RePermit.t.sol/RePermitTest.json +0 -1
- package/out/RePermitLib.sol/RePermitLib.json +0 -1
- package/out/ReentrancyGuard.sol/ReentrancyGuard.json +0 -1
- package/out/Refinery.sol/Refinery.json +0 -1
- package/out/Refinery.t.sol/PayableTarget.json +0 -1
- package/out/Refinery.t.sol/RefineryTest.json +0 -1
- package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.json +0 -1
- package/out/ResolutionLib.sol/ResolutionLib.json +0 -1
- package/out/ResolutionLib.t.sol/ResolutionLibTest.json +0 -1
- package/out/SafeCast.sol/SafeCast.json +0 -1
- package/out/SafeERC20.sol/SafeERC20.json +0 -1
- package/out/Script.sol/Script.json +0 -1
- package/out/SettlementLib.sol/SettlementLib.json +0 -1
- package/out/SettlementLib.t.sol/SettlementLibTest.json +0 -1
- package/out/SettlementLib.t.sol/SettlementWrapper.json +0 -1
- package/out/Settler.sol/Settler.json +0 -1
- package/out/Settler.t.sol/SettlerTest.json +0 -1
- package/out/ShortStrings.sol/ShortStrings.json +0 -1
- package/out/SignatureChecker.sol/SignatureChecker.json +0 -1
- package/out/SignedMath.sol/SignedMath.json +0 -1
- package/out/StdAssertions.sol/StdAssertions.json +0 -1
- package/out/StdChains.sol/StdChains.json +0 -1
- package/out/StdCheats.sol/StdCheats.json +0 -1
- package/out/StdCheats.sol/StdCheatsSafe.json +0 -1
- package/out/StdConstants.sol/StdConstants.json +0 -1
- package/out/StdError.sol/stdError.json +0 -1
- package/out/StdInvariant.sol/StdInvariant.json +0 -1
- package/out/StdJson.sol/stdJson.json +0 -1
- package/out/StdMath.sol/stdMath.json +0 -1
- package/out/StdStorage.sol/stdStorage.json +0 -1
- package/out/StdStorage.sol/stdStorageSafe.json +0 -1
- package/out/StdStyle.sol/StdStyle.json +0 -1
- package/out/StdToml.sol/stdToml.json +0 -1
- package/out/StdUtils.sol/StdUtils.json +0 -1
- package/out/StorageSlot.sol/StorageSlot.json +0 -1
- package/out/Strings.sol/Strings.json +0 -1
- package/out/SurplusLib.sol/SurplusLib.json +0 -1
- package/out/SurplusLib.t.sol/SurplusHarness.json +0 -1
- package/out/SurplusLib.t.sol/SurplusLibTest.json +0 -1
- package/out/SwapAdapter.sol/SwapAdapterMock.json +0 -1
- package/out/Test.sol/Test.json +0 -1
- package/out/TokenLib.sol/TokenLib.json +0 -1
- package/out/TokenLib.t.sol/TokenLibHarness.json +0 -1
- package/out/TokenLib.t.sol/TokenLibTest.json +0 -1
- package/out/USDTMock.sol/USDTMock.json +0 -1
- package/out/UniversalAdapter.sol/UniversalAdapter.json +0 -1
- package/out/UniversalAdapter.t.sol/UniversalAdapterTest.json +0 -1
- package/out/Vm.sol/Vm.json +0 -1
- package/out/Vm.sol/VmSafe.json +0 -1
- package/out/WM.sol/WM.json +0 -1
- package/out/WM.t.sol/WMTest.json +0 -1
- package/out/WMAllowed.sol/WMAllowed.json +0 -1
- package/out/WrappedNativeMock.sol/WrappedNativeMock.json +0 -1
- package/out/build-info/621c6e28e002a5dd.json +0 -1
- package/out/build-info/7683d39d37ddee4a.json +0 -1
- package/out/console.sol/console.json +0 -1
- package/out/draft-IERC6093.sol/IERC1155Errors.json +0 -1
- package/out/draft-IERC6093.sol/IERC20Errors.json +0 -1
- package/out/draft-IERC6093.sol/IERC721Errors.json +0 -1
- package/out/safeconsole.sol/safeconsole.json +0 -1
- package/server.json +0 -21
- package/skill/assets/repermit.skeleton.json +0 -195
- package/skill/assets/token-addressbook.md +0 -97
- package/skill/assets/web3-sign-and-submit.example.js +0 -111
- package/skill/references/01-quickstart.md +0 -12
- package/skill/references/02-params.md +0 -39
- package/skill/references/03-sign.md +0 -6
- package/skill/references/04-patterns.md +0 -12
- package/skill/scripts/order.js +0 -1202
package/README.md
CHANGED
|
@@ -2,111 +2,98 @@
|
|
|
2
2
|
|
|
3
3
|
**Agent-ready decentralized DeFi protocol for non-custodial advanced order types on EVM chains.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Spot provides non-custodial market, limit, TWAP, stop-loss, take-profit, and delayed-start orders on EVM chains, backed by immutable onchain contracts.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**🔒 [Security Audit Report](./Audit-AstraSec.pdf)** by AstraSec
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Why Spot
|
|
10
10
|
|
|
11
|
-
1.
|
|
12
|
-
2.
|
|
13
|
-
3.
|
|
11
|
+
1. ✅ **Non-custodial**: RePermit binds spend authorization to exact order hashes instead of handing custody to the protocol.
|
|
12
|
+
2. 🔒 **Oracle-protected**: Trigger checks, slippage caps, freshness windows, and deadlines constrain execution.
|
|
13
|
+
3. 🛡️ **Battle-tested**: Contracts are audited and covered by an extensive Foundry test suite.
|
|
14
|
+
4. 🏗️ **Production-ready**: Spot is built for multi-chain deployment with repo-shipped config, ABIs, skill files, and MCP metadata.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Supported Order Types
|
|
16
17
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
18
|
+
1. Market swaps
|
|
19
|
+
2. Limit orders
|
|
20
|
+
3. TWAP orders
|
|
21
|
+
4. Stop-loss orders
|
|
22
|
+
5. Take-profit orders
|
|
23
|
+
6. Delayed-start orders
|
|
24
|
+
7. Chunked recurring execution
|
|
21
25
|
|
|
22
|
-
##
|
|
26
|
+
## Supported Chains
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
- ✍️ **Signing Prep**: Produce approval calldata, EIP-712 typed data, and relay-ready payloads
|
|
26
|
-
- 🔎 **Machine Discovery**: Read supported chains, runtime addresses, references, and assets from `manifest.json`
|
|
27
|
-
- 🧰 **Direct Execution Tooling**: Use `skill/scripts/order.js` as the canonical skill helper
|
|
28
|
+
Spot supports multiple EVM chains. See [`config.json`](./config.json) as the canonical source for supported chains and runtime addresses.
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
+
## How It Works
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
- 🔒 **Oracle-Protected**: Trigger checks, slippage caps, freshness windows, and deadline enforcement
|
|
33
|
-
- 🛡️ **Battle-Tested**: Audited contracts, verified runtime components, and comprehensive test coverage
|
|
34
|
-
- 🏗️ **Production Ready**: Multi-chain deployments plus repo-shipped skill files, helper scripts, config, and ABIs
|
|
32
|
+
Each Spot order combines timing, sizing, trigger, and settlement rules in a single signed payload.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
1. `input.amount` is the per-fill chunk size.
|
|
35
|
+
2. `input.maxAmount` is the total budget across fills.
|
|
36
|
+
3. `output.limit` is the minimum acceptable output per chunk.
|
|
37
|
+
4. `output.triggerLower` and `output.triggerUpper` define stop-loss and take-profit style trigger bands.
|
|
38
|
+
5. `epoch` controls recurrence: `0` for one-shot, `> 0` for recurring fills.
|
|
39
|
+
6. `start` and `deadline` define the execution window.
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
`output.limit`, `triggerLower`, and `triggerUpper` are encoded as per-chunk output-token amounts in the output token's decimals.
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
- ✍️ **RePermit** (`src/RePermit.sol`): Permit2-style EIP-712 signatures with witness data that binds spending allowances to exact order hashes, preventing signature reuse
|
|
42
|
-
- 🧾 **Cosigner** (`src/ops/Cosigner.sol`): Attests to trigger-time and current market prices (input/output ratios) with proper token validation
|
|
43
|
-
- 🛠️ **Executor** (`src/Executor.sol`): Whitelisted fillers that run venue logic via delegatecall to adapters, ensure minimum output requirements, and distribute surplus
|
|
44
|
-
- 🔐 **WM** (`src/ops/WM.sol`): Two-step ownership allowlist manager for executors and admin functions with event emission
|
|
45
|
-
- 🏭 **Refinery** (`src/ops/Refinery.sol`): Operations utility for batching multicalls and sweeping token balances by basis points
|
|
43
|
+
A typical order lifecycle is:
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
1. **Order creation**: The user signs one EIP-712 order with chunk size, total amount, limits, slippage tolerance, epoch interval, and deadline.
|
|
46
|
+
2. **Price attestation**: The cosigner signs both trigger-time and current market price data.
|
|
47
|
+
3. **Execution trigger**: A whitelisted executor calls `Executor.execute()` when the order is eligible.
|
|
48
|
+
4. **Validation**: `OrderReactor` validates signatures, checks `start`, enforces epoch windows, verifies timestamps, and applies slippage protection.
|
|
49
|
+
5. **Settlement**: The reactor transfers input tokens, the executor runs adapter logic via delegatecall, and the system enforces minimum output.
|
|
50
|
+
6. **Distribution**: Surplus output is distributed between the swapper and optional referrer according to configured shares.
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
- **OrderValidationLib** (`src/lib/OrderValidationLib.sol`): Order field validation (amounts, tokens, slippage caps)
|
|
51
|
-
- **ResolutionLib** (`src/lib/ResolutionLib.sol`): Price resolution logic using cosigned rates with slippage protection
|
|
52
|
-
- **EpochLib** (`src/lib/EpochLib.sol`): Time-bucket management for TWAP order execution intervals
|
|
53
|
-
- **CosignatureLib** (`src/lib/CosignatureLib.sol`): Cosigner validation and freshness checking
|
|
54
|
-
- **ExclusivityOverrideLib** (`src/lib/ExclusivityOverrideLib.sol`): Time-bounded exclusivity with override mechanics
|
|
55
|
-
- **SurplusLib** (`src/lib/SurplusLib.sol`): Automatic surplus distribution between swappers and referrers
|
|
56
|
-
- **SettlementLib** (`src/lib/SettlementLib.sol`): Token transfer coordination with gas fee handling
|
|
57
|
-
- **TokenLib** (`src/lib/TokenLib.sol`): Safe token operations with ETH/ERC20 abstraction
|
|
52
|
+
## Security
|
|
58
53
|
|
|
59
|
-
|
|
54
|
+
Spot's contracts were professionally audited. See the **[Security Audit Report](./Audit-AstraSec.pdf)**.
|
|
55
|
+
Spot is also oracle-protected: execution depends on cosigned trigger and market price data, freshness windows, and slippage checks.
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
### Access Controls
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Exchange exchange; // Adapter, referrer, and data
|
|
68
|
-
address swapper; // Order creator/signer
|
|
69
|
-
uint256 nonce; // Unique identifier
|
|
70
|
-
uint256 start; // Earliest execution timestamp
|
|
71
|
-
uint256 deadline; // Expiration timestamp
|
|
72
|
-
uint256 chainid; // Chain ID for cross-chain validation
|
|
73
|
-
uint32 exclusivity; // BPS-bounded exclusive execution
|
|
74
|
-
uint32 epoch; // Seconds between fills (0 = single-use)
|
|
75
|
-
uint32 slippage; // BPS applied to cosigned price
|
|
76
|
-
uint32 freshness; // Cosignature validity window in seconds
|
|
77
|
-
Input input; // Token to spend
|
|
78
|
-
Output output; // Token to receive
|
|
79
|
-
}
|
|
59
|
+
1. **WM Allowlist**: WM-gated entrypoints restrict privileged admin operations, and order execution honors exclusivity rules.
|
|
60
|
+
2. **Two-Step Ownership**: `WM` uses OpenZeppelin `Ownable2Step` for secure ownership transfers.
|
|
61
|
+
3. **Executor Binding**: Orders specify an authorized executor; only that executor can fill the order.
|
|
62
|
+
4. **Non-Exclusive Fillers**: `exclusivity = 0` locks fills to the designated executor, while values above zero allow third-party fillers that satisfy the higher minimum output requirement.
|
|
80
63
|
|
|
81
|
-
|
|
82
|
-
address token; // Input token address
|
|
83
|
-
uint256 amount; // Per-fill "chunk" amount
|
|
84
|
-
uint256 maxAmount; // Total amount across all fills
|
|
85
|
-
}
|
|
64
|
+
### Validation Layers
|
|
86
65
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
66
|
+
1. **Order Validation**: `OrderValidationLib.validate()` checks all order fields for validity.
|
|
67
|
+
2. **Signature Verification**: RePermit validates EIP-712 signatures and witness data binding.
|
|
68
|
+
3. **Oracle Price Attestation**: The cosigner supplies trigger-time and current market price data used to gate execution.
|
|
69
|
+
4. **Epoch Enforcement**: `EpochLib.update()` prevents early or duplicate fills within time windows.
|
|
70
|
+
5. **Slippage Protection**: A maximum 50% slippage cap is enforced in `src/Constants.sol`.
|
|
71
|
+
6. **Freshness Windows**: Current cosignatures expire after configurable time periods.
|
|
72
|
+
7. **Trigger Timestamp Rules**: Trigger timestamps must be after `start` and no later than the current timestamp.
|
|
94
73
|
|
|
95
|
-
|
|
74
|
+
### Economic Security
|
|
75
|
+
|
|
76
|
+
1. **Witness-Bound Spending**: RePermit ties allowances to exact order hashes, preventing signature reuse.
|
|
77
|
+
2. **Surplus Distribution**: Excess tokens are distributed between the swapper and referrer.
|
|
78
|
+
3. **Exact Allowances**: `SafeERC20.forceApprove()` avoids allowance accumulation attacks.
|
|
96
79
|
|
|
97
|
-
|
|
80
|
+
### Operational Security
|
|
81
|
+
|
|
82
|
+
1. **Reentrancy Protection**: `OrderReactor` uses `ReentrancyGuard`; `Executor` and `Refinery` rely on WM gating and internal invariants.
|
|
83
|
+
2. **Safe Token Handling**: The system supports USDT-like tokens and ETH handling semantics.
|
|
84
|
+
3. **Delegatecall Isolation**: Adapters run in the controlled executor context with validation around settlement.
|
|
85
|
+
4. **Emergency Pause**: `OrderReactor` can be paused by WM-allowed addresses.
|
|
86
|
+
|
|
87
|
+
## Examples
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
2. **Price Attestation**: Cosigner signs both trigger and current market price data (input/output token ratios)
|
|
101
|
-
3. **Trigger Units**: `output.limit`, `triggerLower`, and `triggerUpper` are per-chunk output-token amounts encoded in the output token's decimals
|
|
102
|
-
4. **Execution**: Whitelisted executor calls `Executor.execute()` with order and execution parameters
|
|
103
|
-
5. **Validation**: OrderReactor validates signatures, checks epoch windows, enforces `start`, checks trigger/current timestamp ordering, and applies slippage protection
|
|
104
|
-
6. **Settlement**: Reactor transfers input tokens, executor runs adapter logic via delegatecall, ensures minimum output, and settles
|
|
105
|
-
7. **Distribution**: Surplus tokens are automatically distributed between swapper and optional referrer based on configured shares
|
|
89
|
+
Plain-English examples:
|
|
106
90
|
|
|
107
|
-
|
|
91
|
+
1. Sell a fixed amount once, but only if the execution meets a minimum output.
|
|
92
|
+
2. Split a larger budget into equal chunks and execute one chunk every hour as a TWAP.
|
|
93
|
+
3. Move into a safer asset if price falls below a stop-loss threshold, or exit on strength if a take-profit threshold is reached.
|
|
108
94
|
|
|
109
95
|
### Single-Shot Limit Order
|
|
96
|
+
|
|
110
97
|
```solidity
|
|
111
98
|
Order memory order = Order({
|
|
112
99
|
// ... standard fields
|
|
@@ -116,7 +103,7 @@ Order memory order = Order({
|
|
|
116
103
|
maxAmount: 1000e6 // Same as amount
|
|
117
104
|
}),
|
|
118
105
|
output: Output({
|
|
119
|
-
limit: 950 ether,
|
|
106
|
+
limit: 950 ether, // Minimum acceptable output
|
|
120
107
|
triggerLower: 0, // No lower trigger gate
|
|
121
108
|
triggerUpper: 0 // No upper trigger gate
|
|
122
109
|
})
|
|
@@ -124,6 +111,7 @@ Order memory order = Order({
|
|
|
124
111
|
```
|
|
125
112
|
|
|
126
113
|
### TWAP Order
|
|
114
|
+
|
|
127
115
|
```solidity
|
|
128
116
|
Order memory order = Order({
|
|
129
117
|
// ... standard fields
|
|
@@ -133,7 +121,7 @@ Order memory order = Order({
|
|
|
133
121
|
maxAmount: 1000e6 // 1000 USDC total budget
|
|
134
122
|
}),
|
|
135
123
|
output: Output({
|
|
136
|
-
limit: 95 ether,
|
|
124
|
+
limit: 95 ether, // Minimum per chunk
|
|
137
125
|
triggerLower: 0,
|
|
138
126
|
triggerUpper: 0
|
|
139
127
|
})
|
|
@@ -141,11 +129,12 @@ Order memory order = Order({
|
|
|
141
129
|
```
|
|
142
130
|
|
|
143
131
|
### Stop-Loss / Take-Profit Order
|
|
132
|
+
|
|
144
133
|
```solidity
|
|
145
134
|
Order memory order = Order({
|
|
146
135
|
// ... standard fields
|
|
147
136
|
epoch: 0, // Single execution
|
|
148
|
-
start: block.timestamp,
|
|
137
|
+
start: block.timestamp, // Order becomes active immediately
|
|
149
138
|
output: Output({
|
|
150
139
|
limit: 900 ether, // Minimum per chunk output when executing
|
|
151
140
|
triggerLower: 950 ether, // Stop-loss boundary per chunk
|
|
@@ -154,86 +143,107 @@ Order memory order = Order({
|
|
|
154
143
|
});
|
|
155
144
|
```
|
|
156
145
|
|
|
146
|
+
## Technical Overview
|
|
157
147
|
|
|
148
|
+
### Core Components
|
|
158
149
|
|
|
159
|
-
|
|
150
|
+
1. 🧠 **OrderReactor** (`src/OrderReactor.sol`): Validates orders, checks epoch constraints, computes minimum output from cosigned prices, settles via inlined implementation with reentrancy protection, and supports emergency pause via the WM allowlist.
|
|
151
|
+
2. ✍️ **RePermit** (`src/RePermit.sol`): Permit2-style EIP-712 signatures with witness data that bind allowances to exact order hashes, preventing signature reuse.
|
|
152
|
+
3. 🧾 **Cosigner** (`src/ops/Cosigner.sol`): Attests to trigger-time and current market prices with token validation.
|
|
153
|
+
4. 🛠️ **Executor** (`src/Executor.sol`): Whitelisted fillers that run venue logic via delegatecall to adapters, enforce minimum output, and distribute surplus.
|
|
154
|
+
5. 🔐 **WM** (`src/ops/WM.sol`): Two-step ownership allowlist manager for executors and admin functions with event emission.
|
|
155
|
+
6. 🏭 **Refinery** (`src/ops/Refinery.sol`): Operations utility for batching multicalls and sweeping token balances by basis points.
|
|
160
156
|
|
|
161
|
-
###
|
|
162
|
-
- **WM Allowlist**: WM-gated entrypoints restrict privileged admin operations; order execution honors exclusivity rules (setting `exclusivity > 0` allows any filler who satisfies the higher min-output requirement)
|
|
163
|
-
- **Two-Step Ownership**: `WM` uses OpenZeppelin's `Ownable2Step` for secure ownership transfers
|
|
164
|
-
- **Executor Binding**: Orders specify authorized executor; only that executor can fill the order
|
|
165
|
-
- **Non-Exclusive Fillers**: `exclusivity = 0` locks fills to the designated executor; setting it above zero invites third-party fillers who must meet a higher minimum output (scaled by the BPS override). Choose a non-zero value only when you intentionally want open competition on callbacks.
|
|
157
|
+
### Order Structure
|
|
166
158
|
|
|
167
|
-
|
|
168
|
-
- **Order Validation**: `OrderValidationLib.validate()` checks all order fields for validity
|
|
169
|
-
- **Signature Verification**: RePermit validates EIP-712 signatures and witness data binding
|
|
170
|
-
- **Epoch Enforcement**: `EpochLib.update()` prevents early/duplicate fills within time windows
|
|
171
|
-
- **Slippage Protection**: Maximum 50% slippage cap enforced in `Constants.MAX_SLIPPAGE`
|
|
172
|
-
- **Freshness Windows**: Current cosignatures expire after configurable time periods
|
|
173
|
-
- **Trigger Timestamp Rules**: Trigger timestamp must be after `start` and not later than the current timestamp
|
|
159
|
+
Based on `src/Structs.sol`, each order contains:
|
|
174
160
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
161
|
+
```solidity
|
|
162
|
+
struct Order {
|
|
163
|
+
address reactor; // OrderReactor contract address
|
|
164
|
+
address executor; // Authorized executor for this order
|
|
165
|
+
Exchange exchange; // Adapter, referrer, and data
|
|
166
|
+
address swapper; // Order creator/signer
|
|
167
|
+
uint256 nonce; // Unique identifier
|
|
168
|
+
uint256 start; // Earliest execution timestamp
|
|
169
|
+
uint256 deadline; // Expiration timestamp
|
|
170
|
+
uint256 chainid; // Chain ID for cross-chain validation
|
|
171
|
+
uint32 exclusivity; // BPS-bounded exclusive execution
|
|
172
|
+
uint32 epoch; // Seconds between fills (0 = single-use)
|
|
173
|
+
uint32 slippage; // BPS applied to cosigned price
|
|
174
|
+
uint32 freshness; // Cosignature validity window in seconds
|
|
175
|
+
Input input; // Token to spend
|
|
176
|
+
Output output; // Token to receive
|
|
177
|
+
}
|
|
179
178
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
struct Input {
|
|
180
|
+
address token; // Input token address
|
|
181
|
+
uint256 amount; // Per-fill chunk amount
|
|
182
|
+
uint256 maxAmount; // Total amount across all fills
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
struct Output {
|
|
186
|
+
address token; // Output token address
|
|
187
|
+
uint256 limit; // Minimum acceptable output, in output-token decimals, per chunk
|
|
188
|
+
uint256 triggerLower; // Lower trigger boundary, in output-token decimals, per chunk
|
|
189
|
+
uint256 triggerUpper; // Upper trigger boundary, in output-token decimals, per chunk
|
|
190
|
+
address recipient; // Where to send output tokens
|
|
191
|
+
}
|
|
192
|
+
```
|
|
185
193
|
|
|
186
|
-
|
|
194
|
+
### Limits & Constants
|
|
187
195
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
1. **Maximum Slippage**: Up to 5,000 BPS, or 50%, inclusive, defined in `src/Constants.sol`.
|
|
197
|
+
2. **Basis Points**: 10,000 BPS equals 100%.
|
|
198
|
+
3. **Freshness Requirements**: Must be greater than 0 seconds and less than epoch duration when `epoch != 0`.
|
|
199
|
+
4. **Epoch Behavior**: `0` means single execution; values above `0` mean recurring execution with that interval.
|
|
200
|
+
5. **Gas Optimization**: Foundry optimizer runs are set to `1,000,000`.
|
|
193
201
|
|
|
202
|
+
### Multi-Chain Deployment
|
|
194
203
|
|
|
204
|
+
The protocol is designed for deployment across EVM-compatible chains with deterministic addresses via CREATE2. Configuration is managed through [`config.json`](./config.json).
|
|
195
205
|
|
|
196
|
-
##
|
|
206
|
+
## For Integrators
|
|
197
207
|
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
forge build # Compiles 90 Solidity files with 0.8.27
|
|
201
|
-
```
|
|
208
|
+
This repository ships these integration surfaces:
|
|
202
209
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
210
|
+
1. Root package `@orbs-network/spot` for config, build orchestration, contracts, and published metadata inputs.
|
|
211
|
+
2. Self-contained skill package [`skill/`](./skill/) published as `@orbs-network/spot-skill`.
|
|
212
|
+
3. MCP package [`mcp/`](./mcp/) published as `@orbs-network/spot-mcp` with server name `io.github.orbs-network/spot`.
|
|
213
|
+
4. Hosted raw files at [`https://orbs-network.github.io/spot/`](https://orbs-network.github.io/spot/) for direct bundle consumption.
|
|
214
|
+
|
|
215
|
+
## Development
|
|
208
216
|
|
|
209
|
-
### Formatting
|
|
210
217
|
```bash
|
|
211
|
-
|
|
218
|
+
npm install
|
|
219
|
+
npm run build
|
|
220
|
+
npm test
|
|
221
|
+
npm run fmt
|
|
212
222
|
```
|
|
213
223
|
|
|
214
|
-
|
|
224
|
+
Notes:
|
|
215
225
|
|
|
216
|
-
|
|
226
|
+
1. `npm run build` runs `npm run sync` and then `forge build --extra-output-files abi`.
|
|
227
|
+
2. Sync-generated skill metadata, MCP registry metadata, and derived `mcp/package.json` fields should not be hand-maintained; MCP-owned fields there such as pinned runtime dependencies are maintained in `mcp/package.json`.
|
|
228
|
+
3. Use `forge test` for the Foundry suite.
|
|
217
229
|
|
|
218
230
|
## Contributing
|
|
219
231
|
|
|
220
|
-
1.
|
|
221
|
-
2.
|
|
222
|
-
3.
|
|
223
|
-
4.
|
|
224
|
-
4. Format code: `forge fmt`
|
|
225
|
-
5. Submit pull request
|
|
232
|
+
1. Make the smallest coherent change.
|
|
233
|
+
2. Keep `skill/`, MCP metadata, and any affected published surfaces in sync.
|
|
234
|
+
3. Run `npm run build` after changes.
|
|
235
|
+
4. Run tests when behavior changes or when explicitly requested.
|
|
226
236
|
|
|
227
237
|
## Operational Notes
|
|
228
238
|
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
1. **Executor ETH Refunds**: Order execution returns the reactor's ETH balance to the filler. Keep executors funded, and treat unexpected reactor ETH as recoverable by WM-allowed addresses.
|
|
240
|
+
2. **Input Tokens**: Orders spend ERC-20 tokens; wrap native ETH before creating orders.
|
|
231
241
|
|
|
232
242
|
## Support
|
|
233
243
|
|
|
234
|
-
|
|
235
|
-
|
|
244
|
+
1. **Issues**: Use GitHub Issues for bug reports and feature requests.
|
|
245
|
+
2. **Documentation**: The repo includes inline code documentation and the canonical skill references.
|
|
236
246
|
|
|
237
247
|
## License
|
|
238
248
|
|
|
239
|
-
MIT
|
|
249
|
+
MIT. See [`LICENSE`](./LICENSE).
|
package/config.json
CHANGED
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
},
|
|
131
131
|
"pancake": {
|
|
132
132
|
"type": "p2:pancakeswap-v2",
|
|
133
|
-
"router": "
|
|
133
|
+
"router": "0xFE6508f0015C778Bdcc1fB5465bA5ebE224C9912",
|
|
134
134
|
"permit2": "0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768",
|
|
135
|
-
"adapter": "
|
|
135
|
+
"adapter": "0xA7CcB11F1D20D1F915FC220F5Cb1646E4523bB75",
|
|
136
136
|
"fee": "0x37A957f10F458e0d7fDECBE2917971b57F15c927"
|
|
137
137
|
},
|
|
138
138
|
"quick": {
|
package/index.html
CHANGED
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<meta name="color-scheme" content="dark">
|
|
7
|
-
<
|
|
7
|
+
<meta name="description" content="Spot Advanced Swap Orders agent bundle: canonical SKILL.md entrypoint with inline metadata, references, assets, and order helper script.">
|
|
8
|
+
<title>Spot Advanced Swap Orders Agent Bundle</title>
|
|
9
|
+
<script>
|
|
10
|
+
if ((location.protocol === 'http:' || location.protocol === 'https:') &&
|
|
11
|
+
!location.pathname.endsWith('/') &&
|
|
12
|
+
!location.pathname.endsWith('/index.html')) {
|
|
13
|
+
location.replace(`${location.pathname}/${location.search}${location.hash}`);
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
8
16
|
<link rel="stylesheet" href="index.css">
|
|
9
17
|
</head>
|
|
10
18
|
<body>
|
|
@@ -13,10 +21,9 @@
|
|
|
13
21
|
<p>Use for gasless non-custodial EVM market, limit, TWAP, stop-loss, take-profit, delayed-start orders. Hosted raw files for AI agents.</p>
|
|
14
22
|
|
|
15
23
|
<section>
|
|
16
|
-
<h2>
|
|
24
|
+
<h2>Start Here</h2>
|
|
17
25
|
<ol>
|
|
18
|
-
<li><a href="SKILL.md">SKILL.md</a></li>
|
|
19
|
-
<li><a href="manifest.json">manifest.json</a></li>
|
|
26
|
+
<li><a href="skill/SKILL.md">SKILL.md</a></li>
|
|
20
27
|
</ol>
|
|
21
28
|
</section>
|
|
22
29
|
|
|
@@ -47,13 +54,12 @@
|
|
|
47
54
|
</section>
|
|
48
55
|
|
|
49
56
|
<footer>
|
|
50
|
-
<h2>
|
|
57
|
+
<h2>Surfaces</h2>
|
|
51
58
|
<ol class="distribution-list">
|
|
52
|
-
<li><a href="
|
|
53
|
-
<li><a href="SKILL.md">
|
|
54
|
-
<li><a href="https://www.npmjs.com/package/@orbs-network/spot">npm package: @orbs-network/spot</a></li>
|
|
55
|
-
<li><a href="
|
|
56
|
-
<li><a href="server.json">MCP metadata: io.github.orbs-network/spot</a></li>
|
|
59
|
+
<li><a href="skill/SKILL.md">Hosted skill entrypoint</a></li>
|
|
60
|
+
<li><a href="https://github.com/orbs-network/spot/blob/main/skill/SKILL.md">GitHub skill entrypoint</a></li>
|
|
61
|
+
<li><a href="https://www.npmjs.com/package/@orbs-network/spot-skill">npm package: @orbs-network/spot-skill</a></li>
|
|
62
|
+
<li><a href="mcp/server.json">MCP metadata: io.github.orbs-network/spot</a></li>
|
|
57
63
|
</ol>
|
|
58
64
|
</footer>
|
|
59
65
|
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/spot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"mcpName": "io.github.orbs-network/spot",
|
|
5
5
|
"description": "**A DeFi protocol for noncustodial advanced order types on EVM chains.**",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://orbs-network.github.io/spot/",
|
|
7
7
|
"bugs": {
|
|
8
8
|
"url": "https://github.com/orbs-network/spot/issues"
|
|
9
9
|
},
|
|
@@ -16,12 +16,14 @@
|
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
19
|
+
"workspaces": [
|
|
20
|
+
"skill",
|
|
21
|
+
"mcp"
|
|
22
|
+
],
|
|
22
23
|
"scripts": {
|
|
23
24
|
"fmt": "forge fmt",
|
|
24
|
-
"
|
|
25
|
+
"sync": "node ./script/sync.mjs",
|
|
26
|
+
"build": "npm run sync && forge build --extra-output-files abi",
|
|
25
27
|
"test": "forge test",
|
|
26
28
|
"prepublishOnly": "npm run fmt && npm run build && npm run test"
|
|
27
29
|
},
|
|
@@ -29,18 +31,9 @@
|
|
|
29
31
|
"config.json",
|
|
30
32
|
"index.css",
|
|
31
33
|
"index.html",
|
|
32
|
-
"SKILL.md",
|
|
33
|
-
"manifest.json",
|
|
34
|
-
"skill/",
|
|
35
34
|
"script/input/",
|
|
36
|
-
"out/**/*.json",
|
|
37
|
-
"index.js"
|
|
38
|
-
"mcp/",
|
|
39
|
-
"server.json"
|
|
35
|
+
"out/**/*.abi.json",
|
|
36
|
+
"index.js"
|
|
40
37
|
],
|
|
41
|
-
"main": "index.js"
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/sdk": "1.27.1",
|
|
44
|
-
"zod": "4.3.6"
|
|
45
|
-
}
|
|
38
|
+
"main": "index.js"
|
|
46
39
|
}
|
package/SKILL.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spot-advanced-swap-orders
|
|
3
|
-
description: Use for gasless non-custodial EVM market, limit, TWAP, stop-loss, take-profit, delayed-start orders.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Spot Advanced Swap Orders
|
|
7
|
-
|
|
8
|
-
Use this for gasless market swaps and advanced orders on supported EVM chains.
|
|
9
|
-
Choose this skill when a user wants market, limit, TWAP, stop-loss, take-profit, or delayed-start execution, or needs to prepare, sign, submit, query, or cancel one of those orders.
|
|
10
|
-
Supply chain, token addresses, chunk sizing, timing, and optional price constraints.
|
|
11
|
-
The helper turns that into approval calldata, EIP-712 typed data, relay-ready submit payloads, and query/cancel guidance,
|
|
12
|
-
while decentralized, non-custodial, oracle-protected, immutable, audited, battle-tested contracts handle execution.
|
|
13
|
-
|
|
14
|
-
## Distribution
|
|
15
|
-
|
|
16
|
-
This skill ships from the canonical repository [`orbs-network/spot`](https://github.com/orbs-network/spot) across four AI-agent distribution surfaces:
|
|
17
|
-
|
|
18
|
-
1. Repo-local files [`SKILL.md`](SKILL.md), [`manifest.json`](manifest.json), and the checked-out [`skill/`](skill/) directory.
|
|
19
|
-
2. Hosted raw files under [`https://orbs-network.github.io/spot/`](https://orbs-network.github.io/spot/), with root entrypoints plus `skill/` support paths.
|
|
20
|
-
3. The npm package `@orbs-network/spot`, which installs the canonical entrypoints under `node_modules/@orbs-network/spot/skill/`.
|
|
21
|
-
4. The stdio MCP adapter `spot-mcp`, published in `server.json` as `io.github.orbs-network/spot`.
|
|
22
|
-
|
|
23
|
-
The checked-in `server.json` registry metadata is derived from this skill manifest plus package metadata, so MCP publishing stays aligned.
|
|
24
|
-
|
|
25
|
-
Outside tools should treat [`SKILL.md`](SKILL.md) as the entrypoint and [`manifest.json`](manifest.json) as the machine-readable companion file.
|
|
26
|
-
|
|
27
|
-
## Auto Check For Updates
|
|
28
|
-
|
|
29
|
-
Before executing this skill in any host agent platform or skill runner:
|
|
30
|
-
|
|
31
|
-
1. Resolve the canonical source for this `spot-advanced-swap-orders` skill surface.
|
|
32
|
-
2. If npm is available, compare the local version to the latest published version of `@orbs-network/spot`, for example with `npm view @orbs-network/spot version`.
|
|
33
|
-
3. If the skill is sourced from git instead of npm, compare the current local tag to the latest canonical git tag, for example with `git describe --tags --abbrev=0` for the current local tag.
|
|
34
|
-
4. If upstream is newer, refresh the package as one unit before execution.
|
|
35
|
-
5. Keep [`SKILL.md`](SKILL.md), [`manifest.json`](manifest.json), and all other files in this package on the same revision. Do not mix versions.
|
|
36
|
-
6. If you cannot verify npm version or git tag freshness, continue only if necessary and explicitly report that version may be outdated.
|
|
37
|
-
|
|
38
|
-
## Workflow
|
|
39
|
-
|
|
40
|
-
1. Read [skill/references/01-quickstart.md](skill/references/01-quickstart.md) for the minimum end-to-end flow.
|
|
41
|
-
2. Read [skill/references/02-params.md](skill/references/02-params.md) when you need field semantics, defaults, units, or validation rules.
|
|
42
|
-
3. Read [skill/references/03-sign.md](skill/references/03-sign.md) for signing, signature formats, and direct onchain cancel.
|
|
43
|
-
4. Read [skill/references/04-patterns.md](skill/references/04-patterns.md) to map user intent into market, limit, stop-loss, take-profit, delayed, or chunked orders.
|
|
44
|
-
5. Optional helper for token lookup: [skill/assets/token-addressbook.md](skill/assets/token-addressbook.md).
|
|
45
|
-
6. Use [skill/assets/repermit.skeleton.json](skill/assets/repermit.skeleton.json) when you need the raw RePermit witness typed-data skeleton.
|
|
46
|
-
7. Use [skill/assets/web3-sign-and-submit.example.js](skill/assets/web3-sign-and-submit.example.js) for a browser or injected-provider signing and submit example.
|
|
47
|
-
8. Inspect [manifest.json](manifest.json) for the machine-readable entrypoint, references, live supported-chain matrix, sink URL, and runtime contract addresses.
|
|
48
|
-
9. Use only [skill/scripts/order.js](skill/scripts/order.js) to prepare, submit, query, and watch orders.
|
|
49
|
-
|
|
50
|
-
## Guardrails
|
|
51
|
-
|
|
52
|
-
1. Supported chains and runtime addresses live in [manifest.json](manifest.json).
|
|
53
|
-
2. Use only the provided [skill/scripts/order.js](skill/scripts/order.js). Do not send typed data or signatures anywhere else.
|
|
54
|
-
3. Use [skill/references/02-params.md](skill/references/02-params.md) as the authoritative source for native-asset rules and for `output.limit` / trigger units.
|
|
55
|
-
4. Detailed order behavior, parameter rules, signing rules, and order-shape guidance live in the reference files above.
|
|
56
|
-
|
|
57
|
-
## Commands
|
|
58
|
-
|
|
59
|
-
1. Prepare: `node skill/scripts/order.js prepare --params <params.json|-> [--out <prepared.json>]`
|
|
60
|
-
2. Submit: `node skill/scripts/order.js submit --prepared <prepared.json|-> --signature <0x...|json>`
|
|
61
|
-
3. Submit variants: `--signature-file <file|->` or `--r <0x...> --s <0x...> --v <0x...>`
|
|
62
|
-
4. Query: `node skill/scripts/order.js query --swapper <0x...>` or `--hash <0x...>`
|
|
63
|
-
5. Watch: `node skill/scripts/order.js watch --hash <0x...> [--interval <seconds>] [--timeout <seconds>]`
|
package/manifest.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "spot-advanced-swap-orders",
|
|
3
|
-
"title": "Spot Advanced Swap Orders",
|
|
4
|
-
"description": "Use for gasless non-custodial EVM market, limit, TWAP, stop-loss, take-profit, delayed-start orders.",
|
|
5
|
-
"entrypoint": "SKILL.md",
|
|
6
|
-
"references": [
|
|
7
|
-
"skill/references/01-quickstart.md",
|
|
8
|
-
"skill/references/02-params.md",
|
|
9
|
-
"skill/references/03-sign.md",
|
|
10
|
-
"skill/references/04-patterns.md"
|
|
11
|
-
],
|
|
12
|
-
"scripts": [
|
|
13
|
-
"skill/scripts/order.js"
|
|
14
|
-
],
|
|
15
|
-
"assets": [
|
|
16
|
-
"skill/assets/token-addressbook.md",
|
|
17
|
-
"skill/assets/repermit.skeleton.json",
|
|
18
|
-
"skill/assets/web3-sign-and-submit.example.js"
|
|
19
|
-
],
|
|
20
|
-
"runtime": {
|
|
21
|
-
"url": "https://agents-sink.orbs.network",
|
|
22
|
-
"contracts": {
|
|
23
|
-
"zero": "0x0000000000000000000000000000000000000000",
|
|
24
|
-
"repermit": "0x00002a9C4D9497df5Bd31768eC5d30eEf5405000",
|
|
25
|
-
"reactor": "0x000000b33fE4fB9d999Dd684F79b110731c3d000",
|
|
26
|
-
"executor": "0x000642A0966d9bd49870D9519f76b5cf823f3000"
|
|
27
|
-
},
|
|
28
|
-
"chains": {
|
|
29
|
-
"1": {
|
|
30
|
-
"name": "Ethereum",
|
|
31
|
-
"adapter": "0xC1bB4d5071Fe7109ae2D67AE05826A3fe9116cfc"
|
|
32
|
-
},
|
|
33
|
-
"56": {
|
|
34
|
-
"name": "BNB Chain",
|
|
35
|
-
"adapter": "0x67Feba015c968c76cCB2EEabf197b4578640BE2C"
|
|
36
|
-
},
|
|
37
|
-
"137": {
|
|
38
|
-
"name": "Polygon",
|
|
39
|
-
"adapter": "0x75A3d70Fa6d054d31C896b9Cf8AB06b1c1B829B8"
|
|
40
|
-
},
|
|
41
|
-
"146": {
|
|
42
|
-
"name": "Sonic",
|
|
43
|
-
"adapter": "0x58fD209C81D84739BaD9c72C082350d67E713EEa"
|
|
44
|
-
},
|
|
45
|
-
"8453": {
|
|
46
|
-
"name": "Base",
|
|
47
|
-
"adapter": "0x5906C4dD71D5afFe1a8f0215409E912eB5d593AD"
|
|
48
|
-
},
|
|
49
|
-
"42161": {
|
|
50
|
-
"name": "Arbitrum One",
|
|
51
|
-
"adapter": "0x026B8977319F67078e932a08feAcB59182B5380f"
|
|
52
|
-
},
|
|
53
|
-
"43114": {
|
|
54
|
-
"name": "Avalanche",
|
|
55
|
-
"adapter": "0x4F48041842827823D3750399eCa2832fC2E29201"
|
|
56
|
-
},
|
|
57
|
-
"59144": {
|
|
58
|
-
"name": "Linea",
|
|
59
|
-
"adapter": "0x55E4da2cd634729064bEb294EC682Dc94f5c3f24"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|