@orbs-network/spot 2.2.1 → 2.3.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 +10 -9
- package/SKILL.md +9 -6
- package/config.json +44 -22
- package/out/00_DeployWM.s.sol/DeployWM.json +1 -1
- package/out/00_UpdateWMWhitelist.s.sol/UpdateWMWhitelist.json +1 -1
- package/out/01_DeployRepermit.s.sol/DeployRepermit.json +1 -1
- package/out/02_DeployCosigner.s.sol/DeployCosigner.json +1 -1
- package/out/03_DeployReactor.s.sol/DeployReactor.json +1 -1
- package/out/04_DeployExecutor.s.sol/DeployExecutor.json +1 -1
- package/out/05_DeployRefinery.s.sol/DeployRefinery.json +1 -1
- package/out/06_DeployDefaultAdapter.s.sol/DeployDefaultAdapter.json +1 -1
- package/out/06_DeployDelegatingAdapter.s.sol/DeployDelegatingAdapter.json +1 -1
- package/out/06_DeployP2Adapter.s.sol/DeployP2Adapter.json +1 -1
- package/out/06_DeployParaswapAdapter.s.sol/DeployParaswapAdapter.json +1 -1
- package/out/06_DeployUniversalAdapter.s.sol/DeployUniversalAdapter.json +1 -1
- package/out/AbstractSigner.sol/AbstractSigner.json +1 -1
- package/out/Address.sol/Address.json +1 -1
- package/out/BaseTest.sol/BaseTest.json +1 -1
- package/out/Bytes.sol/Bytes.json +1 -1
- package/out/Constants.sol/Constants.json +1 -1
- package/out/Context.sol/Context.json +1 -1
- package/out/CosignatureLib.sol/CosignatureLib.json +1 -1
- package/out/CosignatureLib.t.sol/CosignatureLibTest.json +1 -1
- package/out/Cosigner.sol/Cosigner.json +1 -1
- package/out/Cosigner.t.sol/CosignerTest.json +1 -1
- package/out/Cosigner.t.sol/CosignerWrapper.json +1 -1
- package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.json +1 -1
- package/out/DefaultDexAdapter.sol/DefaultDexAdapter.json +1 -1
- package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.json +1 -1
- package/out/DelegatingAdapter.sol/DelegatingAdapter.json +1 -1
- package/out/DelegatingAdapter.t.sol/DelegatingAdapterTest.json +1 -1
- package/out/DelegatingAdapter.t.sol/MockDelegateTarget.json +1 -1
- package/out/ECDSA.sol/ECDSA.json +1 -1
- package/out/EIP712.sol/EIP712.json +1 -1
- package/out/ERC20.sol/ERC20.json +1 -1
- package/out/ERC20Mock.sol/ERC20Mock.json +1 -1
- package/out/ERC20Mock6Decimals.sol/ERC20Mock6Decimals.json +1 -1
- package/out/EpochLib.sol/EpochLib.json +1 -1
- package/out/EpochLib.t.sol/EpochLibTest.json +1 -1
- package/out/Errors.sol/Errors.json +1 -1
- package/out/ExclusivityOverrideLib.sol/ExclusivityOverrideLib.json +1 -1
- package/out/ExclusivityOverrideLib.t.sol/ExclusivityCaller.json +1 -1
- package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.json +1 -1
- package/out/Executor.sol/Executor.json +1 -1
- package/out/Executor.t.sol/ExecutorTest.json +1 -1
- package/out/FeeOnTransferERC20Mock.sol/FeeOnTransferERC20Mock.json +1 -1
- package/out/ICommitteeSync.sol/ICommitteeSync.json +1 -1
- package/out/IEIP712.sol/IEIP712.json +1 -1
- package/out/IERC1271.sol/IERC1271.json +1 -1
- package/out/IERC1363.sol/IERC1363.json +1 -1
- package/out/IERC165.sol/IERC165.json +1 -1
- package/out/IERC20.sol/IERC20.json +1 -1
- package/out/IERC20Metadata.sol/IERC20Metadata.json +1 -1
- package/out/IERC5267.sol/IERC5267.json +1 -1
- package/out/IERC7913.sol/IERC7913SignatureVerifier.json +1 -1
- package/out/IExchangeAdapter.sol/IExchangeAdapter.json +1 -1
- package/out/IMulticall3.sol/IMulticall3.json +1 -1
- package/out/IParaswapAugustus.sol/IParaswapAugustus.json +1 -1
- package/out/IPermit2.sol/IPermit2.json +1 -1
- package/out/IReactor.sol/IReactor.json +1 -1
- package/out/IReactorCallback.sol/IReactorCallback.json +1 -1
- package/out/IWM.sol/IWM.json +1 -1
- package/out/IWrappedNative.sol/IWrappedNative.json +1 -1
- package/out/LowLevelCall.sol/LowLevelCall.json +1 -1
- package/out/Math.sol/Math.json +1 -1
- package/out/MessageHashUtils.sol/MessageHashUtils.json +1 -1
- package/out/MockCommitteeSync.sol/MockCommitteeSync.json +1 -1
- package/out/MockDexRouter.sol/MockDexRouter.json +1 -1
- package/out/MockParaswap.sol/MockParaswapAugustus.json +1 -1
- package/out/MockParaswap.sol/MockTokenTransferProxy.json +1 -1
- package/out/MockPermit2.sol/MockPermit2.json +1 -1
- package/out/MockReactor.sol/MockReactor.json +1 -1
- package/out/Multicall3Lib.sol/Multicall3Lib.json +1 -1
- package/out/OrderLib.sol/OrderLib.json +1 -1
- package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.json +1 -1
- package/out/OrderReactor.sol/OrderReactor.json +1 -1
- package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.json +1 -1
- package/out/OrderReactorPause.t.sol/SimpleCallback.json +1 -1
- package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.json +1 -1
- package/out/OrderValidationLib.sol/OrderValidationLib.json +1 -1
- package/out/OrderValidationLib.t.sol/OrderValidationLibTest.json +1 -1
- package/out/Ownable.sol/Ownable.json +1 -1
- package/out/Ownable2Step.sol/Ownable2Step.json +1 -1
- package/out/P2DexAdapter.sol/P2DexAdapter.json +1 -1
- package/out/P2DexAdapter.t.sol/P2DexAdapterTest.json +1 -1
- package/out/Panic.sol/Panic.json +1 -1
- package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.json +1 -1
- package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.json +1 -1
- package/out/Pausable.sol/Pausable.json +1 -1
- package/out/RePermit.sol/RePermit.json +1 -1
- package/out/RePermit.t.sol/RePermitTest.json +1 -1
- package/out/RePermitLib.sol/RePermitLib.json +1 -1
- package/out/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
- package/out/Refinery.sol/Refinery.json +1 -1
- package/out/Refinery.t.sol/PayableTarget.json +1 -1
- package/out/Refinery.t.sol/RefineryTest.json +1 -1
- package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.json +1 -1
- package/out/ResolutionLib.sol/ResolutionLib.json +1 -1
- package/out/ResolutionLib.t.sol/ResolutionLibTest.json +1 -1
- package/out/SafeCast.sol/SafeCast.json +1 -1
- package/out/SafeERC20.sol/SafeERC20.json +1 -1
- package/out/SettlementLib.sol/SettlementLib.json +1 -1
- package/out/SettlementLib.t.sol/SettlementLibTest.json +1 -1
- package/out/SettlementLib.t.sol/SettlementWrapper.json +1 -1
- package/out/Settler.sol/Settler.json +1 -1
- package/out/Settler.t.sol/SettlerTest.json +1 -1
- package/out/ShortStrings.sol/ShortStrings.json +1 -1
- package/out/SignatureChecker.sol/SignatureChecker.json +1 -1
- package/out/SignedMath.sol/SignedMath.json +1 -1
- package/out/StdAssertions.sol/StdAssertions.json +1 -1
- package/out/StdError.sol/stdError.json +1 -1
- package/out/StdInvariant.sol/StdInvariant.json +1 -1
- package/out/StdJson.sol/stdJson.json +1 -1
- package/out/StdMath.sol/stdMath.json +1 -1
- package/out/StdStorage.sol/stdStorage.json +1 -1
- package/out/StdStorage.sol/stdStorageSafe.json +1 -1
- package/out/StdStyle.sol/StdStyle.json +1 -1
- package/out/StdToml.sol/stdToml.json +1 -1
- package/out/StdUtils.sol/StdUtils.json +1 -1
- package/out/StorageSlot.sol/StorageSlot.json +1 -1
- package/out/Strings.sol/Strings.json +1 -1
- package/out/SurplusLib.sol/SurplusLib.json +1 -1
- package/out/SurplusLib.t.sol/SurplusHarness.json +1 -1
- package/out/SurplusLib.t.sol/SurplusLibTest.json +1 -1
- package/out/SwapAdapter.sol/SwapAdapterMock.json +1 -1
- package/out/Test.sol/Test.json +1 -1
- package/out/TokenLib.sol/TokenLib.json +1 -1
- package/out/TokenLib.t.sol/TokenLibHarness.json +1 -1
- package/out/TokenLib.t.sol/TokenLibTest.json +1 -1
- package/out/USDTMock.sol/USDTMock.json +1 -1
- package/out/UniversalAdapter.sol/UniversalAdapter.json +1 -1
- package/out/UniversalAdapter.t.sol/UniversalAdapterTest.json +1 -1
- package/out/Vm.sol/Vm.json +1 -1
- package/out/Vm.sol/VmSafe.json +1 -1
- package/out/WM.sol/WM.json +1 -1
- package/out/WM.t.sol/WMTest.json +1 -1
- package/out/WMAllowed.sol/WMAllowed.json +1 -1
- package/out/WrappedNativeMock.sol/WrappedNativeMock.json +1 -1
- package/out/build-info/3df4e20ba14c59dd.json +1 -0
- package/out/build-info/465c047ca4b4665a.json +1 -0
- package/out/build-info/60dfb67f4a3af77c.json +1 -0
- package/out/build-info/6ac02f5da52c59ff.json +1 -0
- package/out/build-info/a8388d68fbee0b5e.json +1 -0
- package/out/build-info/af81a549954c7cd5.json +1 -0
- package/out/build-info/e607157652a1c385.json +1 -0
- package/out/console.sol/console.json +1 -1
- package/out/draft-IERC6093.sol/IERC1155Errors.json +1 -1
- package/out/draft-IERC6093.sol/IERC20Errors.json +1 -1
- package/out/draft-IERC6093.sol/IERC721Errors.json +1 -1
- package/out/safeconsole.sol/safeconsole.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skill/assets/web3-sign-and-submit.example.js +31 -11
- package/skill/references/01-quickstart.md +9 -10
- package/skill/references/02-params.md +4 -4
- package/skill/references/03-sign.md +1 -2
- package/skill/references/04-patterns.md +2 -2
- package/skill/scripts/order.js +295 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC-721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x981460d505328349eed07798a87d2cb432da70633e45ac3c60b1081b3d7a8e86\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f04330ec0b36ce165f97fac5d37a1e463e1735caca291d8b18d1249e4a6523cd\",\"dweb:/ipfs/Qma3R3iRhfz3pZuSnriZrmJsSJ5mexyYZVTNXEfDqczRhz\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.27+commit.40a35a09"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"],"optimizer":{"enabled":true,"runs":1000000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"prague","libraries":{}},"sources":{"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x981460d505328349eed07798a87d2cb432da70633e45ac3c60b1081b3d7a8e86","urls":["bzz-raw://f04330ec0b36ce165f97fac5d37a1e463e1735caca291d8b18d1249e4a6523cd","dweb:/ipfs/Qma3R3iRhfz3pZuSnriZrmJsSJ5mexyYZVTNXEfDqczRhz"],"license":"MIT"}},"version":1},"id":
|
|
1
|
+
{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC-721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x981460d505328349eed07798a87d2cb432da70633e45ac3c60b1081b3d7a8e86\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f04330ec0b36ce165f97fac5d37a1e463e1735caca291d8b18d1249e4a6523cd\",\"dweb:/ipfs/Qma3R3iRhfz3pZuSnriZrmJsSJ5mexyYZVTNXEfDqczRhz\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.27+commit.40a35a09"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"],"optimizer":{"enabled":true,"runs":1000000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"prague","libraries":{}},"sources":{"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x981460d505328349eed07798a87d2cb432da70633e45ac3c60b1081b3d7a8e86","urls":["bzz-raw://f04330ec0b36ce165f97fac5d37a1e463e1735caca291d8b18d1249e4a6523cd","dweb:/ipfs/Qma3R3iRhfz3pZuSnriZrmJsSJ5mexyYZVTNXEfDqczRhz"],"license":"MIT"}},"version":1},"id":28}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":[],"bytecode":{"object":"0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203ac30a58a054c8797afb4abdf0d57aee74a687fa17d8ff74b51b1951679ab68264736f6c634300081b0033","sourceMap":"163:427371:
|
|
1
|
+
{"abi":[],"bytecode":{"object":"0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203ac30a58a054c8797afb4abdf0d57aee74a687fa17d8ff74b51b1951679ab68264736f6c634300081b0033","sourceMap":"163:427371:14:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;163:427371:14;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203ac30a58a054c8797afb4abdf0d57aee74a687fa17d8ff74b51b1951679ab68264736f6c634300081b0033","sourceMap":"163:427371:14:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.27+commit.40a35a09\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"philogy <https://github.com/philogy>\",\"details\":\"Code generated automatically by script.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/safeconsole.sol\":\"safeconsole\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/forge-std/src/safeconsole.sol\":{\"keccak256\":\"0xbef9786cb49d3eade757bad87568c49c8c8f35721f0193c95ffb055d9e466e11\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3bafd2b0b2d28068d329f95ea8a1fbce3719c257fcb863fc01abcbafd8d531ab\",\"dweb:/ipfs/QmUeaFjKWTVDBsHVfSob4mwt6A5hTnKDz22HaUXeZhypa3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.27+commit.40a35a09"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"],"optimizer":{"enabled":true,"runs":1000000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/forge-std/src/safeconsole.sol":"safeconsole"},"evmVersion":"prague","libraries":{}},"sources":{"lib/forge-std/src/safeconsole.sol":{"keccak256":"0xbef9786cb49d3eade757bad87568c49c8c8f35721f0193c95ffb055d9e466e11","urls":["bzz-raw://3bafd2b0b2d28068d329f95ea8a1fbce3719c257fcb863fc01abcbafd8d531ab","dweb:/ipfs/QmUeaFjKWTVDBsHVfSob4mwt6A5hTnKDz22HaUXeZhypa3"],"license":"MIT"}},"version":1},"id":14}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/spot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"mcpName": "io.github.orbs-network/spot",
|
|
5
5
|
"description": "**A DeFi protocol for noncustodial advanced order types on EVM chains.**",
|
|
6
6
|
"homepage": "https://github.com/orbs-network/spot#readme",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/orbs-network/spot",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.3.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@orbs-network/spot",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.3.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
import Web3 from "web3";
|
|
5
5
|
|
|
6
6
|
const DEPOSIT_DATA = "0xd0e30db0";
|
|
7
|
+
const ERC20_ABI = [
|
|
8
|
+
{
|
|
9
|
+
constant: true,
|
|
10
|
+
inputs: [
|
|
11
|
+
{ name: "owner", type: "address" },
|
|
12
|
+
{ name: "spender", type: "address" },
|
|
13
|
+
],
|
|
14
|
+
name: "allowance",
|
|
15
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
16
|
+
type: "function",
|
|
17
|
+
},
|
|
18
|
+
];
|
|
7
19
|
|
|
8
20
|
export async function approveSignAndSubmitOrder({
|
|
9
21
|
prepared,
|
|
@@ -11,7 +23,7 @@ export async function approveSignAndSubmitOrder({
|
|
|
11
23
|
provider = window.ethereum,
|
|
12
24
|
wrappedNative,
|
|
13
25
|
nativeInputAmount,
|
|
14
|
-
sendApproval =
|
|
26
|
+
sendApproval = true,
|
|
15
27
|
}) {
|
|
16
28
|
const web3 = new Web3(provider);
|
|
17
29
|
const normalizedAccount = account.toLowerCase();
|
|
@@ -43,16 +55,24 @@ export async function approveSignAndSubmitOrder({
|
|
|
43
55
|
});
|
|
44
56
|
}
|
|
45
57
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
if (prepared.approval && sendApproval) {
|
|
59
|
+
// The skill helper is RPC-agnostic, so the caller should use its own
|
|
60
|
+
// provider access to avoid resending the same infinite approval.
|
|
61
|
+
const token = new web3.eth.Contract(ERC20_ABI, prepared.approval.tx.to);
|
|
62
|
+
const allowance = BigInt(
|
|
63
|
+
await token.methods
|
|
64
|
+
.allowance(account, prepared.approval.spender)
|
|
65
|
+
.call()
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
if (allowance < BigInt(prepared.approval.amount)) {
|
|
69
|
+
await web3.eth.sendTransaction({
|
|
70
|
+
from: account,
|
|
71
|
+
to: prepared.approval.tx.to,
|
|
72
|
+
data: prepared.approval.tx.data,
|
|
73
|
+
value: prepared.approval.tx.value,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
56
76
|
}
|
|
57
77
|
|
|
58
78
|
// This example uses eth_signTypedData_v4, but any equivalent EIP-712 signer works.
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
3
|
1. Required fields: `chainId`, `swapper`, `input.token`, `input.amount`, `output.token`.
|
|
4
|
-
2.
|
|
5
|
-
3.
|
|
6
|
-
4.
|
|
7
|
-
5.
|
|
8
|
-
6.
|
|
9
|
-
7.
|
|
10
|
-
8.
|
|
11
|
-
9.
|
|
12
|
-
10.
|
|
13
|
-
11. When measuring a fill onchain, sum both transfers to the swapper: the main fill and the surplus refund. Measuring only the main fill undercounts actual output by up to the slippage tolerance.
|
|
4
|
+
2. Choose the intended order shape before preparing: market, limit, stop-loss, take-profit, delayed-start, or chunked/TWAP.
|
|
5
|
+
3. Prepare the order with the helper.
|
|
6
|
+
4. If approval is needed, send `prepared.approval.tx` to approve `RePermit`.
|
|
7
|
+
5. The skill helper does not read allowance onchain. The calling agent or app should use its own RPC or provider access to compare the current ERC-20 allowance against `prepared.approval.amount`, send that infinite approval only when allowance is lower, and then leave the infinite approval in place with no reset.
|
|
8
|
+
6. Sign `prepared.typedData` as the `swapper`.
|
|
9
|
+
7. Submit the signed order.
|
|
10
|
+
8. Query the order by `swapper` or `hash`.
|
|
11
|
+
9. Watch until terminal state. Default polling is every 5 seconds, timeout `0` means no timeout, and transient network errors are retried automatically.
|
|
12
|
+
10. When measuring a fill onchain, sum both transfers to the swapper: the main fill and the surplus refund. Measuring only the main fill undercounts actual output by up to the slippage tolerance.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Params
|
|
2
2
|
|
|
3
|
-
Use this file for field semantics, defaults, units, and validation.
|
|
3
|
+
Use this file for field semantics, defaults, units, and validation.
|
|
4
4
|
|
|
5
5
|
1. Required: `chainId`, `swapper`, `input.token`, `input.amount`, `output.token`.
|
|
6
6
|
2. Optional: `input.maxAmount`, `nonce`, `start`, `deadline`, `epoch`, `slippage`, `output.limit`, `output.triggerLower`, `output.triggerUpper`, `output.recipient`.
|
|
7
|
-
3. `input.amount` is the fixed per-chunk size. `input.maxAmount` is total size
|
|
8
|
-
4. `output.limit`, `output.triggerLower`, and `output.triggerUpper` are output-token
|
|
7
|
+
3. `input.amount` is the fixed per-chunk size. `input.maxAmount` is the total requested size. If omitted, it defaults to `input.amount`. If it is not divisible by `input.amount`, the helper rounds it down to a whole number of chunks.
|
|
8
|
+
4. `output.limit`, `output.triggerLower`, and `output.triggerUpper` are output-token amounts per chunk, encoded in the output token's decimals.
|
|
9
9
|
5. Future `start` delays the first fill. `epoch` is the delay between chunks, but it is not exact: each chunk can fill anywhere inside its epoch window, only once. Large `epoch` is not a delayed order by itself.
|
|
10
10
|
6. Chunked orders should use `epoch > 0`; with `epoch = 0`, only the first chunk can fill.
|
|
11
11
|
7. Defaults:
|
|
@@ -19,7 +19,7 @@ Use this file for field semantics, defaults, units, and validation. Use [04-patt
|
|
|
19
19
|
- `output.recipient = swapper`
|
|
20
20
|
8. Higher slippage is still protected by oracle pricing and offchain executors.
|
|
21
21
|
9. `output.recipient` is dangerous to change away from `swapper`.
|
|
22
|
-
10. Native input is not supported. Wrap to WNATIVE first. Native output is supported with `output.token = 0x0000000000000000000000000000000000000000`.
|
|
22
|
+
10. Native input is not supported. Wrap to WNATIVE first. Native output, including "back to native" orders, is supported directly with `output.token = 0x0000000000000000000000000000000000000000`.
|
|
23
23
|
11. Example:
|
|
24
24
|
|
|
25
25
|
```json
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
1. Sign `prepared.typedData` with any EIP-712-capable wallet or library. The signer must equal `swapper`. `eth_signTypedData_v4` is only one example.
|
|
4
4
|
2. Submit with `--prepared <prepared.json|->` and exactly one signature mode: `--signature <0x...|json>`, `--signature-file <sig.txt|sig.json|->`, or `--r <0x...> --s <0x...> --v <0x...>`.
|
|
5
5
|
3. The helper accepts a full 65-byte signature, a JSON string, or JSON/object `r/s/v`.
|
|
6
|
-
4.
|
|
7
|
-
5. Cancel trustlessly onchain by calling `RePermit.cancel([digest])` as the swapper for the signed RePermit digest.
|
|
6
|
+
4. Cancel trustlessly onchain by calling `RePermit.cancel([digest])` as the swapper for the signed RePermit digest.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
1. Market swap: `input.amount = input.maxAmount`, `output.limit = 0`.
|
|
4
4
|
2. Limit order: `input.amount = input.maxAmount`, `output.limit > 0`.
|
|
5
|
-
3. Stop-loss or take-profit: set `output.triggerLower` and/or `output.triggerUpper
|
|
5
|
+
3. Stop-loss or take-profit: set `output.triggerLower` for stop-loss and/or `output.triggerUpper` for take-profit.
|
|
6
6
|
4. Delayed order: set future `start`.
|
|
7
7
|
5. Chunked or TWAP-style: set `input.amount < input.maxAmount`.
|
|
8
8
|
6. Time-spaced chunked order: set `epoch > 0`. For example, `epoch = 60` means one chunk can fill once anywhere inside each 60-second epoch window.
|
|
9
9
|
7. `N chunks`: use one TWAP order instead of manually submitting `N` separate orders. Use `input.maxAmount` as the requested total amount, set `input.amount = floor(total / N)`, and accept any rounded-down remainder as dust.
|
|
10
10
|
8. If timing is omitted for a chunked or TWAP order, `epoch` defaults to `60`. Single orders default to `0`.
|
|
11
|
-
9. Native output: set `output.token = 0x0000000000000000000000000000000000000000`.
|
|
11
|
+
9. Native output or back to native exposure: set `output.token = 0x0000000000000000000000000000000000000000`.
|
|
12
12
|
10. Best execution and oracle protection apply regardless of `output.limit`.
|