-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Se7en-Seas/new-withdraw-queue
Update withdraws to use new safe functions
- Loading branch information
Showing
4 changed files
with
1,025 additions
and
1,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,233 +1 @@ | ||
export default [ | ||
{ | ||
inputs: [{ internalType: "address", name: "user", type: "address" }], | ||
name: "AtomicQueue__RequestDeadlineExceeded", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [{ internalType: "address", name: "user", type: "address" }], | ||
name: "AtomicQueue__UserNotInSolve", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [{ internalType: "address", name: "user", type: "address" }], | ||
name: "AtomicQueue__UserRepeated", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [{ internalType: "address", name: "user", type: "address" }], | ||
name: "AtomicQueue__ZeroOfferAmount", | ||
type: "error", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "user", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "offerToken", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "wantToken", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "offerAmountSpent", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "wantAmountReceived", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "timestamp", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "AtomicRequestFulfilled", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "user", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "offerToken", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "wantToken", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "amount", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "deadline", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "minPrice", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "timestamp", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "AtomicRequestUpdated", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address", name: "user", type: "address" }, | ||
{ internalType: "contract ERC20", name: "offer", type: "address" }, | ||
{ internalType: "contract ERC20", name: "want", type: "address" }, | ||
], | ||
name: "getUserAtomicRequest", | ||
outputs: [ | ||
{ | ||
components: [ | ||
{ internalType: "uint64", name: "deadline", type: "uint64" }, | ||
{ internalType: "uint88", name: "atomicPrice", type: "uint88" }, | ||
{ internalType: "uint96", name: "offerAmount", type: "uint96" }, | ||
{ internalType: "bool", name: "inSolve", type: "bool" }, | ||
], | ||
internalType: "struct AtomicQueue.AtomicRequest", | ||
name: "", | ||
type: "tuple", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "contract ERC20", name: "offer", type: "address" }, | ||
{ internalType: "address", name: "user", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: "uint64", name: "deadline", type: "uint64" }, | ||
{ internalType: "uint88", name: "atomicPrice", type: "uint88" }, | ||
{ internalType: "uint96", name: "offerAmount", type: "uint96" }, | ||
{ internalType: "bool", name: "inSolve", type: "bool" }, | ||
], | ||
internalType: "struct AtomicQueue.AtomicRequest", | ||
name: "userRequest", | ||
type: "tuple", | ||
}, | ||
], | ||
name: "isAtomicRequestValid", | ||
outputs: [{ internalType: "bool", name: "", type: "bool" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "contract ERC20", name: "offer", type: "address" }, | ||
{ internalType: "contract ERC20", name: "want", type: "address" }, | ||
{ internalType: "address[]", name: "users", type: "address[]" }, | ||
{ internalType: "bytes", name: "runData", type: "bytes" }, | ||
{ internalType: "address", name: "solver", type: "address" }, | ||
], | ||
name: "solve", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "contract ERC20", name: "offer", type: "address" }, | ||
{ internalType: "contract ERC20", name: "want", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: "uint64", name: "deadline", type: "uint64" }, | ||
{ internalType: "uint88", name: "atomicPrice", type: "uint88" }, | ||
{ internalType: "uint96", name: "offerAmount", type: "uint96" }, | ||
{ internalType: "bool", name: "inSolve", type: "bool" }, | ||
], | ||
internalType: "struct AtomicQueue.AtomicRequest", | ||
name: "userRequest", | ||
type: "tuple", | ||
}, | ||
], | ||
name: "updateAtomicRequest", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address", name: "", type: "address" }, | ||
{ internalType: "contract ERC20", name: "", type: "address" }, | ||
{ internalType: "contract ERC20", name: "", type: "address" }, | ||
], | ||
name: "userAtomicRequest", | ||
outputs: [ | ||
{ internalType: "uint64", name: "deadline", type: "uint64" }, | ||
{ internalType: "uint88", name: "atomicPrice", type: "uint88" }, | ||
{ internalType: "uint96", name: "offerAmount", type: "uint96" }, | ||
{ internalType: "bool", name: "inSolve", type: "bool" }, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "contract ERC20", name: "offer", type: "address" }, | ||
{ internalType: "contract ERC20", name: "want", type: "address" }, | ||
{ internalType: "address[]", name: "users", type: "address[]" }, | ||
], | ||
name: "viewSolveMetaData", | ||
outputs: [ | ||
{ | ||
components: [ | ||
{ internalType: "address", name: "user", type: "address" }, | ||
{ internalType: "uint8", name: "flags", type: "uint8" }, | ||
{ internalType: "uint256", name: "assetsToOffer", type: "uint256" }, | ||
{ internalType: "uint256", name: "assetsForWant", type: "uint256" }, | ||
], | ||
internalType: "struct AtomicQueue.SolveMetaData[]", | ||
name: "metaData", | ||
type: "tuple[]", | ||
}, | ||
{ internalType: "uint256", name: "totalAssetsForWant", type: "uint256" }, | ||
{ internalType: "uint256", name: "totalAssetsToOffer", type: "uint256" }, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
]; | ||
export default [{ "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "contract Authority", "name": "_auth", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "AtomicQueue__Paused", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "AtomicQueue__RequestDeadlineExceeded", "type": "error" }, { "inputs": [], "name": "AtomicQueue__SafeRequestAccountantOfferMismatch", "type": "error" }, { "inputs": [], "name": "AtomicQueue__SafeRequestCannotCastToUint88", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "deadline", "type": "uint256" }], "name": "AtomicQueue__SafeRequestDeadlineExceeded", "type": "error" }, { "inputs": [], "name": "AtomicQueue__SafeRequestDiscountTooLarge", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "offerAmount", "type": "uint256" }, { "internalType": "uint256", "name": "offerAllowance", "type": "uint256" }], "name": "AtomicQueue__SafeRequestInsufficientOfferAllowance", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "offerAmount", "type": "uint256" }, { "internalType": "uint256", "name": "offerBalance", "type": "uint256" }], "name": "AtomicQueue__SafeRequestOfferAmountGreaterThanOfferBalance", "type": "error" }, { "inputs": [], "name": "AtomicQueue__SafeRequestOfferAmountZero", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "AtomicQueue__UserNotInSolve", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "AtomicQueue__UserRepeated", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "AtomicQueue__ZeroOfferAmount", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "offerToken", "type": "address" }, { "indexed": true, "internalType": "address", "name": "wantToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "offerAmountSpent", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "wantAmountReceived", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "name": "AtomicRequestFulfilled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "offerToken", "type": "address" }, { "indexed": true, "internalType": "address", "name": "wantToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "minPrice", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "name": "AtomicRequestUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "contract Authority", "name": "newAuthority", "type": "address" }], "name": "AuthorityUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "MAX_DISCOUNT", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "authority", "outputs": [{ "internalType": "contract Authority", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }], "name": "getUserAtomicRequest", "outputs": [{ "components": [{ "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "uint88", "name": "atomicPrice", "type": "uint88" }, { "internalType": "uint96", "name": "offerAmount", "type": "uint96" }, { "internalType": "bool", "name": "inSolve", "type": "bool" }], "internalType": "struct AtomicQueue.AtomicRequest", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "address", "name": "user", "type": "address" }, { "components": [{ "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "uint88", "name": "atomicPrice", "type": "uint88" }, { "internalType": "uint96", "name": "offerAmount", "type": "uint96" }, { "internalType": "bool", "name": "inSolve", "type": "bool" }], "internalType": "struct AtomicQueue.AtomicRequest", "name": "userRequest", "type": "tuple" }], "name": "isAtomicRequestValid", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isPaused", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }, { "components": [{ "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "uint88", "name": "atomicPrice", "type": "uint88" }, { "internalType": "uint96", "name": "offerAmount", "type": "uint96" }, { "internalType": "bool", "name": "inSolve", "type": "bool" }], "internalType": "struct AtomicQueue.AtomicRequest", "name": "userRequest", "type": "tuple" }, { "internalType": "contract AccountantWithRateProviders", "name": "accountant", "type": "address" }, { "internalType": "uint256", "name": "discount", "type": "uint256" }], "name": "safeUpdateAtomicRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract Authority", "name": "newAuthority", "type": "address" }], "name": "setAuthority", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }, { "internalType": "address[]", "name": "users", "type": "address[]" }, { "internalType": "bytes", "name": "runData", "type": "bytes" }, { "internalType": "address", "name": "solver", "type": "address" }], "name": "solve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }, { "components": [{ "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "uint88", "name": "atomicPrice", "type": "uint88" }, { "internalType": "uint96", "name": "offerAmount", "type": "uint96" }, { "internalType": "bool", "name": "inSolve", "type": "bool" }], "internalType": "struct AtomicQueue.AtomicRequest", "name": "userRequest", "type": "tuple" }], "name": "updateAtomicRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "contract ERC20", "name": "", "type": "address" }, { "internalType": "contract ERC20", "name": "", "type": "address" }], "name": "userAtomicRequest", "outputs": [{ "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "uint88", "name": "atomicPrice", "type": "uint88" }, { "internalType": "uint96", "name": "offerAmount", "type": "uint96" }, { "internalType": "bool", "name": "inSolve", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }, { "internalType": "address[]", "name": "users", "type": "address[]" }], "name": "viewSolveMetaData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint8", "name": "flags", "type": "uint8" }, { "internalType": "uint256", "name": "assetsToOffer", "type": "uint256" }, { "internalType": "uint256", "name": "assetsForWant", "type": "uint256" }], "internalType": "struct AtomicQueue.SolveMetaData[]", "name": "metaData", "type": "tuple[]" }, { "internalType": "uint256", "name": "totalAssetsForWant", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssetsToOffer", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20", "name": "offer", "type": "address" }, { "internalType": "contract ERC20", "name": "want", "type": "address" }, { "internalType": "address[]", "name": "users", "type": "address[]" }], "name": "viewVerboseSolveMetaData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "bool", "name": "deadlineExceeded", "type": "bool" }, { "internalType": "bool", "name": "zeroOfferAmount", "type": "bool" }, { "internalType": "bool", "name": "insufficientOfferBalance", "type": "bool" }, { "internalType": "bool", "name": "insufficientOfferAllowance", "type": "bool" }, { "internalType": "uint256", "name": "assetsToOffer", "type": "uint256" }, { "internalType": "uint256", "name": "assetsForWant", "type": "uint256" }], "internalType": "struct AtomicQueue.VerboseSolveMetaData[]", "name": "metaData", "type": "tuple[]" }, { "internalType": "uint256", "name": "totalAssetsForWant", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssetsToOffer", "type": "uint256" }], "stateMutability": "view", "type": "function" }]; |
Oops, something went wrong.