Skip to content

Commit

Permalink
Merge pull request #3 from Se7en-Seas/new-withdraw-queue
Browse files Browse the repository at this point in the history
Update withdraws to use new safe functions
  • Loading branch information
philipjames44 authored Jul 25, 2024
2 parents 40d158b + 8263da3 commit 630e01b
Show file tree
Hide file tree
Showing 4 changed files with 1,025 additions and 1,246 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boring-vault-ui",
"version": "1.6.0",
"version": "1.6.1",
"description": "A reusable package to quickly integrate boring vaults onto a UI.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
234 changes: 1 addition & 233 deletions src/abis/v1/BoringWithdrawQueueContractABI.tsx
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" }];
Loading

0 comments on commit 630e01b

Please sign in to comment.