diff --git a/scripts/constants/generate-market-map.ts b/scripts/constants/generate-market-map.ts index 5e1dc9516..1ef672b69 100644 --- a/scripts/constants/generate-market-map.ts +++ b/scripts/constants/generate-market-map.ts @@ -4,7 +4,7 @@ import prettier from "prettier"; const projectRoot = process.cwd(); -const CHAIN_IDS = [1, 11155111, 8453, 42161, 21000000, 98865]; +const CHAIN_IDS = [1, 11155111, 8453, 42161, 21000000, 98865, 146]; const generateMarketMap = async () => { // Generate maps for each chain ID diff --git a/scripts/constants/generate-token-map.ts b/scripts/constants/generate-token-map.ts index bac979fc3..d901e8aa2 100644 --- a/scripts/constants/generate-token-map.ts +++ b/scripts/constants/generate-token-map.ts @@ -4,7 +4,7 @@ import prettier from "prettier"; const projectRoot = process.cwd(); -const CHAIN_IDS = [1, 11155111, 8453, 42161, 21000000, 98865]; +const CHAIN_IDS = [1, 11155111, 8453, 42161, 21000000, 98865, 146]; const generateTokenMap = async () => { // Generate maps for each chain ID diff --git a/sdk/constants/chain-map/chain-map.tsx b/sdk/constants/chain-map/chain-map.tsx index 741119085..da8389142 100644 --- a/sdk/constants/chain-map/chain-map.tsx +++ b/sdk/constants/chain-map/chain-map.tsx @@ -5,6 +5,7 @@ import { base, corn, plume, + sonic, } from "viem/chains"; import { type Chain } from "viem/chains"; @@ -53,6 +54,13 @@ export const Plume = { symbol: "PLUME", }; +export const Sonic = { + ...sonic, + name: "Sonic", + image: "https://icons.llamao.fi/icons/chains/rsz_sonic.jpg", + symbol: "SONIC", +}; + export const SupportedChainMap: Record = { [ethereumSepolia.id]: EthereumSepolia, [ethereumMainnet.id]: EthereumMainnet, @@ -60,6 +68,7 @@ export const SupportedChainMap: Record = { [base.id]: Base, [corn.id]: Corn, [plume.id]: Plume, + [sonic.id]: Sonic, }; export const SupportedChainlist = Object.values(SupportedChainMap); diff --git a/sdk/constants/market-map/146/index.ts b/sdk/constants/market-map/146/index.ts new file mode 100644 index 000000000..2fd81cce2 --- /dev/null +++ b/sdk/constants/market-map/146/index.ts @@ -0,0 +1 @@ +export const MarketMap146 = {}; diff --git a/sdk/constants/market-map/8453/definitions/8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75.ts b/sdk/constants/market-map/8453/definitions/8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75.ts index d78ff811c..1e65b7b04 100644 --- a/sdk/constants/market-map/8453/definitions/8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75.ts +++ b/sdk/constants/market-map/8453/definitions/8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75.ts @@ -5,4 +5,4 @@ export default defineMarket({ name: `Deposit USDC into SuperUSDC for 10 weeks`, description: `Deposit USDC into Superform's SuperUSDC on Base for 3 months. SuperUSDC optimizes across blue-chip lending yield on Base to earn the best returns.`, is_verified: false, -}); \ No newline at end of file +}); diff --git a/sdk/constants/market-map/8453/index.ts b/sdk/constants/market-map/8453/index.ts index f4cf174dc..acf1a6d1d 100644 --- a/sdk/constants/market-map/8453/index.ts +++ b/sdk/constants/market-map/8453/index.ts @@ -1,6 +1,7 @@ import market_8453_0_0x01343749855527b9525f0a2c5e12daff5f3da81bfd8af3514334fdfb5a9ae931 from "./definitions/8453_0_0x01343749855527b9525f0a2c5e12daff5f3da81bfd8af3514334fdfb5a9ae931"; import market_8453_0_0x1b467d65fde4ec8988e8df1706d0f9e028db8d41e14d10fbbd7b194e5744ac59 from "./definitions/8453_0_0x1b467d65fde4ec8988e8df1706d0f9e028db8d41e14d10fbbd7b194e5744ac59"; import market_8453_0_0x1ca4129e09bfea50d71f1aaf8ef52be058b58301939a84406c51286454147591 from "./definitions/8453_0_0x1ca4129e09bfea50d71f1aaf8ef52be058b58301939a84406c51286454147591"; +import market_8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75 from "./definitions/8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75"; import market_8453_0_0x63cb3b36c1b893932321463867a6dbfac387611b28eee083d8d256e35e00f348 from "./definitions/8453_0_0x63cb3b36c1b893932321463867a6dbfac387611b28eee083d8d256e35e00f348"; import market_8453_0_0xd9cefc89a473c60f4c2328fc6af2cc0dbe59f250299133ab3c53c5afc0fdb11a from "./definitions/8453_0_0xd9cefc89a473c60f4c2328fc6af2cc0dbe59f250299133ab3c53c5afc0fdb11a"; import market_8453_1_0x114f63d0cc180e2e886a1eaa84eb4458632504cb from "./definitions/8453_1_0x114f63d0cc180e2e886a1eaa84eb4458632504cb"; @@ -22,6 +23,8 @@ export const MarketMap8453 = { market_8453_0_0x1b467d65fde4ec8988e8df1706d0f9e028db8d41e14d10fbbd7b194e5744ac59, [market_8453_0_0x1ca4129e09bfea50d71f1aaf8ef52be058b58301939a84406c51286454147591.id]: market_8453_0_0x1ca4129e09bfea50d71f1aaf8ef52be058b58301939a84406c51286454147591, + [market_8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75.id]: + market_8453_0_0x2be8bc14f1bca4285983c31503d487bf512df01a3d5469c5d7f35c0a7f2f6b75, [market_8453_0_0x63cb3b36c1b893932321463867a6dbfac387611b28eee083d8d256e35e00f348.id]: market_8453_0_0x63cb3b36c1b893932321463867a6dbfac387611b28eee083d8d256e35e00f348, [market_8453_0_0xd9cefc89a473c60f4c2328fc6af2cc0dbe59f250299133ab3c53c5afc0fdb11a.id]: diff --git a/sdk/constants/market-map/market-map.tsx b/sdk/constants/market-map/market-map.tsx index deefbb7c5..b354c62de 100644 --- a/sdk/constants/market-map/market-map.tsx +++ b/sdk/constants/market-map/market-map.tsx @@ -4,6 +4,7 @@ import { MarketMap42161 } from "./42161"; import { MarketMap8453 } from "./8453"; import { MarketMap21000000 } from "./21000000"; import { MarketMap98865 } from "./98865"; +import { MarketMap146 } from "./146"; import type { SupportedMarket } from "./utils"; @@ -14,6 +15,7 @@ export { MarketMap8453, MarketMap21000000, MarketMap98865, + MarketMap146, }; export const SupportedMarketMap = { @@ -23,6 +25,7 @@ export const SupportedMarketMap = { ...MarketMap8453, ...MarketMap21000000, ...MarketMap98865, + ...MarketMap146, } as Record; export const MarketList = Object.values(SupportedMarketMap); diff --git a/sdk/constants/token-map/146/definitions/146-0x29219dd400f2bf60e5a23d13be72b486d4038894.ts b/sdk/constants/token-map/146/definitions/146-0x29219dd400f2bf60e5a23d13be72b486d4038894.ts new file mode 100644 index 000000000..fd2d5b0ba --- /dev/null +++ b/sdk/constants/token-map/146/definitions/146-0x29219dd400f2bf60e5a23d13be72b486d4038894.ts @@ -0,0 +1,15 @@ +import { defineToken } from "@/sdk/constants"; + +export default defineToken({ + id: "146-0x29219dd400f2bf60e5a23d13be72b486d4038894", + chain_id: 146, + contract_address: "0x29219dd400f2bf60e5a23d13be72b486d4038894", + name: "Sonic Bridged USDC.e (Sonic)", + symbol: "USDC.e", + image: + "https://coin-images.coingecko.com/coins/images/53064/large/logo.png?1735179479", + decimals: 6, + source: "coingecko", + search_id: "sonic-bridged-usdc-e-sonic", + type: "token", +}); diff --git a/sdk/constants/token-map/146/index.ts b/sdk/constants/token-map/146/index.ts new file mode 100644 index 000000000..50f8201f1 --- /dev/null +++ b/sdk/constants/token-map/146/index.ts @@ -0,0 +1,6 @@ +import token_146_0x29219dd400f2bf60e5a23d13be72b486d4038894 from "./definitions/146-0x29219dd400f2bf60e5a23d13be72b486d4038894"; + +export const TokenMap146 = { + [token_146_0x29219dd400f2bf60e5a23d13be72b486d4038894.id]: + token_146_0x29219dd400f2bf60e5a23d13be72b486d4038894, +}; diff --git a/sdk/constants/token-map/21000000/definitions/21000000-0xdf0b24095e15044538866576754f3c964e902ee6.ts b/sdk/constants/token-map/21000000/definitions/21000000-0xdf0b24095e15044538866576754f3c964e902ee6.ts index 7de7215ce..310f0250b 100644 --- a/sdk/constants/token-map/21000000/definitions/21000000-0xdf0b24095e15044538866576754f3c964e902ee6.ts +++ b/sdk/constants/token-map/21000000/definitions/21000000-0xdf0b24095e15044538866576754f3c964e902ee6.ts @@ -5,7 +5,7 @@ export default defineToken({ chain_id: 21000000, contract_address: "0xdf0b24095e15044538866576754f3c964e902ee6", name: "Bridged USDC (Corn)", - symbol: "USDC.E", + symbol: "USDC.e", image: "https://coin-images.coingecko.com/coins/images/30691/large/usdc.png?1696529560", decimals: 6, diff --git a/sdk/constants/token-map/42161/definitions/42161-0xff970a61a04b1ca14834a43f5de4533ebddb5cc8.ts b/sdk/constants/token-map/42161/definitions/42161-0xff970a61a04b1ca14834a43f5de4533ebddb5cc8.ts index f2cfe21e0..bd05804ea 100644 --- a/sdk/constants/token-map/42161/definitions/42161-0xff970a61a04b1ca14834a43f5de4533ebddb5cc8.ts +++ b/sdk/constants/token-map/42161/definitions/42161-0xff970a61a04b1ca14834a43f5de4533ebddb5cc8.ts @@ -5,7 +5,7 @@ export default defineToken({ chain_id: 42161, contract_address: "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8", name: "Arbitrum Bridged USDC (Arbitrum)", - symbol: "USDC.E", + symbol: "USDC.e", image: "https://coin-images.coingecko.com/coins/images/30691/large/usdc.png?1696529560", decimals: 6, diff --git a/sdk/constants/token-map/token-map.tsx b/sdk/constants/token-map/token-map.tsx index 7286a5e82..0581c1f5c 100644 --- a/sdk/constants/token-map/token-map.tsx +++ b/sdk/constants/token-map/token-map.tsx @@ -4,6 +4,7 @@ import { TokenMap11155111 } from "./11155111"; import { TokenMap8453 } from "./8453"; import { TokenMap21000000 } from "./21000000"; import { TokenMap98865 } from "./98865"; +import { TokenMap146 } from "./146"; import { NULL_ADDRESS } from "../market-utils"; import type { SupportedToken } from "./utils"; @@ -15,6 +16,7 @@ export { TokenMap8453, TokenMap98865, TokenMap21000000, + TokenMap146, }; export const SupportedTokenMap = { @@ -24,6 +26,7 @@ export const SupportedTokenMap = { ...TokenMap8453, ...TokenMap21000000, ...TokenMap98865, + ...TokenMap146, } as Record; export const SupportedTokenList = Object.values(SupportedTokenMap); diff --git a/sdk/contracts/146/contract-abis/PointsFactory.json b/sdk/contracts/146/contract-abis/PointsFactory.json new file mode 100644 index 000000000..23377f360 --- /dev/null +++ b/sdk/contracts/146/contract-abis/PointsFactory.json @@ -0,0 +1,183 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { "name": "_owner", "type": "address", "internalType": "address" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addRecipeMarketHub", + "inputs": [ + { + "name": "_recipeMarketHub", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createPointsProgram", + "inputs": [ + { "name": "_name", "type": "string", "internalType": "string" }, + { "name": "_symbol", "type": "string", "internalType": "string" }, + { "name": "_decimals", "type": "uint256", "internalType": "uint256" }, + { "name": "_owner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { + "name": "points", + "type": "address", + "internalType": "contract Points" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isPointsProgram", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isRecipeMarketHub", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "NewPointsProgram", + "inputs": [ + { + "name": "points", + "type": "address", + "indexed": true, + "internalType": "contract Points" + }, + { + "name": "name", + "type": "string", + "indexed": true, + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "indexed": true, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RecipeMarketHubAdded", + "inputs": [ + { + "name": "recipeMarketHub", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { "name": "account", "type": "address", "internalType": "address" } + ] + } + ] +} diff --git a/sdk/contracts/146/contract-abis/RecipeMarketHub.json b/sdk/contracts/146/contract-abis/RecipeMarketHub.json new file mode 100644 index 000000000..ca7544110 --- /dev/null +++ b/sdk/contracts/146/contract-abis/RecipeMarketHub.json @@ -0,0 +1,1138 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_weirollWalletImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "_protocolFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minimumFrontendFee", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "_owner", "type": "address", "internalType": "address" }, + { + "name": "_pointsFactory", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "MIN_FILL_PERCENT", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "POINTS_FACTORY", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WEIROLL_WALLET_IMPLEMENTATION", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cancelAPOffer", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "cancelIPOffer", + "inputs": [ + { "name": "offerHash", "type": "bytes32", "internalType": "bytes32" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "internalType": "address" + }, + { "name": "to", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "internalType": "address" + }, + { + "name": "incentiveToken", + "type": "address", + "internalType": "address" + }, + { "name": "to", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claimFees", + "inputs": [ + { + "name": "incentiveToken", + "type": "address", + "internalType": "address" + }, + { "name": "to", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "createAPOffer", + "inputs": [ + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "quantity", "type": "uint256", "internalType": "uint256" }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { "name": "offerHash", "type": "bytes32", "internalType": "bytes32" } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "createIPOffer", + "inputs": [ + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "quantity", "type": "uint256", "internalType": "uint256" }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesOffered", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsPaid", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { "name": "offerHash", "type": "bytes32", "internalType": "bytes32" } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "createMarket", + "inputs": [ + { "name": "inputToken", "type": "address", "internalType": "address" }, + { "name": "lockupTime", "type": "uint256", "internalType": "uint256" }, + { "name": "frontendFee", "type": "uint256", "internalType": "uint256" }, + { + "name": "depositRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "withdrawRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "rewardStyle", + "type": "uint8", + "internalType": "enum RewardStyle" + } + ], + "outputs": [ + { "name": "marketHash", "type": "bytes32", "internalType": "bytes32" } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executeWithdrawalScript", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "feeClaimantToTokenToAmount", + "inputs": [ + { "name": "", "type": "address", "internalType": "address" }, + { "name": "", "type": "address", "internalType": "address" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "fillAPOffers", + "inputs": [ + { + "name": "offers", + "type": "tuple[]", + "internalType": "struct RecipeMarketHubBase.APOffer[]", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "fillAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "frontendFeeRecipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "fillIPOffers", + "inputs": [ + { + "name": "ipOfferHashes", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "fillAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { + "name": "frontendFeeRecipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "forfeit", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "internalType": "address" + }, + { "name": "executeWithdrawal", "type": "bool", "internalType": "bool" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "getAPOfferHash", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getIPOfferHash", + "inputs": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "ip", "type": "address", "internalType": "address" }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { "name": "quantity", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesOffered", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentiveAmountsOffered", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getMarketHash", + "inputs": [ + { + "name": "market", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.WeirollMarket", + "components": [ + { + "name": "marketID", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "inputToken", + "type": "address", + "internalType": "contract ERC20" + }, + { + "name": "lockupTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "frontendFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "depositRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "withdrawRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "rewardStyle", + "type": "uint8", + "internalType": "enum RewardStyle" + } + ] + } + ], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "marketHashToWeirollMarket", + "inputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "outputs": [ + { "name": "marketID", "type": "uint256", "internalType": "uint256" }, + { + "name": "inputToken", + "type": "address", + "internalType": "contract ERC20" + }, + { "name": "lockupTime", "type": "uint256", "internalType": "uint256" }, + { "name": "frontendFee", "type": "uint256", "internalType": "uint256" }, + { + "name": "depositRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "withdrawRecipe", + "type": "tuple", + "internalType": "struct RecipeMarketHubBase.Recipe", + "components": [ + { + "name": "weirollCommands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "weirollState", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + }, + { + "name": "rewardStyle", + "type": "uint8", + "internalType": "enum RewardStyle" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumFrontendFee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "numAPOffers", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "numIPOffers", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "numMarkets", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "offerHashToIPOffer", + "inputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "outputs": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetMarketHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { "name": "ip", "type": "address", "internalType": "address" }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { "name": "quantity", "type": "uint256", "internalType": "uint256" }, + { + "name": "remainingQuantity", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "offerHashToRemainingQuantity", + "inputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFeeClaimant", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setMinimumFrontendFee", + "inputs": [ + { + "name": "_minimumFrontendFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setOffersPaused", + "inputs": [ + { "name": "_offersPaused", "type": "bool", "internalType": "bool" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { "name": "_protocolFee", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setProtocolFeeClaimant", + "inputs": [ + { + "name": "_protocolFeeClaimant", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weirollWalletToLockedIncentivesParams", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [ + { "name": "ip", "type": "address", "internalType": "address" }, + { + "name": "frontendFeeRecipient", + "type": "address", + "internalType": "address" + }, + { "name": "wasIPOffer", "type": "bool", "internalType": "bool" }, + { "name": "offerHash", "type": "bytes32", "internalType": "bytes32" }, + { + "name": "protocolFeeAtFill", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "APOfferCancelled", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "APOfferCreated", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "marketHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "ap", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fundingVault", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "incentiveAddresses", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "incentiveAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "expiry", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "APOfferFilled", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "ip", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fillAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "weirollWallet", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "incentiveAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "protocolFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "frontendFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesClaimed", + "inputs": [ + { + "name": "claimant", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "incentive", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "IPOfferCancelled", + "inputs": [ + { + "name": "offerHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "IPOfferCreated", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "offerHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "marketHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "ip", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "incentivesOffered", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "incentiveAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "protocolFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "frontendFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "expiry", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "IPOfferFilled", + "inputs": [ + { + "name": "offerHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "ap", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fillAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "weirollWallet", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "incentiveAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "protocolFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "frontendFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MarketCreated", + "inputs": [ + { + "name": "marketID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "marketHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "inputToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "lockupTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "frontendFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "rewardStyle", + "type": "uint8", + "indexed": false, + "internalType": "enum RewardStyle" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "user", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WeirollWalletClaimedIncentive", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "incentive", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WeirollWalletExecutedWithdrawal", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WeirollWalletForfeited", + "inputs": [ + { + "name": "weirollWallet", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { "type": "error", "name": "ArrayLengthMismatch", "inputs": [] }, + { "type": "error", "name": "CannotFillZeroQuantityOffer", "inputs": [] }, + { "type": "error", "name": "CannotPlaceExpiredOffer", "inputs": [] }, + { "type": "error", "name": "CannotPlaceZeroQuantityOffer", "inputs": [] }, + { "type": "error", "name": "CreateFail", "inputs": [] }, + { "type": "error", "name": "FrontendFeeTooLow", "inputs": [] }, + { "type": "error", "name": "InsufficientFillPercent", "inputs": [] }, + { "type": "error", "name": "InvalidMarketInputToken", "inputs": [] }, + { "type": "error", "name": "InvalidPointsProgram", "inputs": [] }, + { "type": "error", "name": "MarketDoesNotExist", "inputs": [] }, + { "type": "error", "name": "MismatchedBaseAsset", "inputs": [] }, + { "type": "error", "name": "NoIncentivesPaidOnFill", "inputs": [] }, + { "type": "error", "name": "NotEnoughRemainingQuantity", "inputs": [] }, + { "type": "error", "name": "NotOwner", "inputs": [] }, + { "type": "error", "name": "OfferCannotContainDuplicates", "inputs": [] }, + { "type": "error", "name": "OfferExpired", "inputs": [] }, + { "type": "error", "name": "OffersPaused", "inputs": [] }, + { "type": "error", "name": "ReentrancyGuardReentrantCall", "inputs": [] }, + { "type": "error", "name": "TokenDoesNotExist", "inputs": [] }, + { "type": "error", "name": "TotalFeeTooHigh", "inputs": [] }, + { "type": "error", "name": "WalletLocked", "inputs": [] }, + { "type": "error", "name": "WalletNotForfeitable", "inputs": [] }, + { "type": "error", "name": "WeirollWalletFundingFailed", "inputs": [] } + ] +} diff --git a/sdk/contracts/146/contract-abis/VaultMarketHub.json b/sdk/contracts/146/contract-abis/VaultMarketHub.json new file mode 100644 index 000000000..90aa8539a --- /dev/null +++ b/sdk/contracts/146/contract-abis/VaultMarketHub.json @@ -0,0 +1,464 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { "name": "_owner", "type": "address", "internalType": "address" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "MIN_CAMPAIGN_DURATION", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allocateOffer", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct VaultMarketHub.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetVault", + "type": "address", + "internalType": "address" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allocateOffer", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct VaultMarketHub.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetVault", + "type": "address", + "internalType": "address" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { "name": "fillAmount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allocateOffers", + "inputs": [ + { + "name": "offers", + "type": "tuple[]", + "internalType": "struct VaultMarketHub.APOffer[]", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetVault", + "type": "address", + "internalType": "address" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "fillAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "cancelOffer", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct VaultMarketHub.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetVault", + "type": "address", + "internalType": "address" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createAPOffer", + "inputs": [ + { "name": "targetVault", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "quantity", "type": "uint256", "internalType": "uint256" }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getOfferHash", + "inputs": [ + { + "name": "offer", + "type": "tuple", + "internalType": "struct VaultMarketHub.APOffer", + "components": [ + { "name": "offerID", "type": "uint256", "internalType": "uint256" }, + { + "name": "targetVault", + "type": "address", + "internalType": "address" + }, + { "name": "ap", "type": "address", "internalType": "address" }, + { + "name": "fundingVault", + "type": "address", + "internalType": "address" + }, + { "name": "expiry", "type": "uint256", "internalType": "uint256" }, + { + "name": "incentivesRequested", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "incentivesRatesRequested", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "numOffers", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "offerHashToRemainingQuantity", + "inputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "offersPaused", + "inputs": [], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setOffersPaused", + "inputs": [ + { "name": "_offersPaused", "type": "bool", "internalType": "bool" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "APOfferCancelled", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "APOfferCreated", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "marketID", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "ap", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fundingVault", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "quantity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "incentivesRequested", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "incentivesRates", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "expiry", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "APOfferFilled", + "inputs": [ + { + "name": "offerID", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "fillAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { "type": "error", "name": "ArrayLengthMismatch", "inputs": [] }, + { + "type": "error", + "name": "CannotPlaceBelowMinQuantityOffer", + "inputs": [] + }, + { "type": "error", "name": "CannotPlaceExpiredOffer", "inputs": [] }, + { "type": "error", "name": "FundingVaultWithdrawFailed", "inputs": [] }, + { "type": "error", "name": "MismatchedBaseAsset", "inputs": [] }, + { "type": "error", "name": "NotEnoughBaseAssetToAllocate", "inputs": [] }, + { "type": "error", "name": "NotEnoughBaseAssetToOffer", "inputs": [] }, + { "type": "error", "name": "NotEnoughRemainingQuantity", "inputs": [] }, + { "type": "error", "name": "NotOfferCreator", "inputs": [] }, + { "type": "error", "name": "OfferConditionsNotMet", "inputs": [] }, + { "type": "error", "name": "OfferDoesNotExist", "inputs": [] }, + { "type": "error", "name": "OfferExpired", "inputs": [] }, + { "type": "error", "name": "OffersPaused", "inputs": [] }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { "name": "account", "type": "address", "internalType": "address" } + ] + }, + { "type": "error", "name": "ReentrancyGuardReentrantCall", "inputs": [] } + ] +} diff --git a/sdk/contracts/146/contract-abis/WeirollWallet.json b/sdk/contracts/146/contract-abis/WeirollWallet.json new file mode 100644 index 000000000..7c3ab113f --- /dev/null +++ b/sdk/contracts/146/contract-abis/WeirollWallet.json @@ -0,0 +1,143 @@ +{ + "abi": [ + { "type": "fallback", "stateMutability": "payable" }, + { "type": "receive", "stateMutability": "payable" }, + { + "type": "function", + "name": "amount", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "value", "type": "uint256", "internalType": "uint256" }, + { "name": "data", "type": "bytes", "internalType": "bytes" } + ], + "outputs": [{ "name": "", "type": "bytes", "internalType": "bytes" }], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executeWeiroll", + "inputs": [ + { + "name": "commands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { "name": "state", "type": "bytes[]", "internalType": "bytes[]" } + ], + "outputs": [{ "name": "", "type": "bytes[]", "internalType": "bytes[]" }], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executed", + "inputs": [], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "forfeit", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "forfeited", + "inputs": [], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isForfeitable", + "inputs": [], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isValidSignature", + "inputs": [ + { "name": "digest", "type": "bytes32", "internalType": "bytes32" }, + { "name": "signature", "type": "bytes", "internalType": "bytes" } + ], + "outputs": [{ "name": "", "type": "bytes4", "internalType": "bytes4" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "lockedUntil", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "manualExecuteWeiroll", + "inputs": [ + { + "name": "commands", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { "name": "state", "type": "bytes[]", "internalType": "bytes[]" } + ], + "outputs": [{ "name": "", "type": "bytes[]", "internalType": "bytes[]" }], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "marketHash", + "inputs": [], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "recipeMarketHub", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "WeirollWalletExecutedManually", + "inputs": [], + "anonymous": false + }, + { + "type": "error", + "name": "ExecutionFailed", + "inputs": [ + { + "name": "command_index", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "target", "type": "address", "internalType": "address" }, + { "name": "message", "type": "string", "internalType": "string" } + ] + }, + { "type": "error", "name": "NotOwner", "inputs": [] }, + { "type": "error", "name": "NotRecipeMarketHub", "inputs": [] }, + { "type": "error", "name": "OfferUnfilled", "inputs": [] }, + { "type": "error", "name": "RawExecutionFailed", "inputs": [] }, + { "type": "error", "name": "WalletLocked", "inputs": [] }, + { "type": "error", "name": "WalletNotForfeitable", "inputs": [] } + ] +} diff --git a/sdk/contracts/146/contract-abis/WeirollWalletHelper.json b/sdk/contracts/146/contract-abis/WeirollWalletHelper.json new file mode 100644 index 000000000..b96ef5649 --- /dev/null +++ b/sdk/contracts/146/contract-abis/WeirollWalletHelper.json @@ -0,0 +1,76 @@ +{ + "abi": [ + { + "inputs": [], + "name": "amount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executed", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "forfeited", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isForfeitable", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lockedUntil", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "marketHash", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nativeBalance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "recipeMarketHub", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "thisWallet", + "outputs": [ + { "internalType": "address payable", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + } + ] +} diff --git a/sdk/contracts/146/contract-abis/WrappedVault.json b/sdk/contracts/146/contract-abis/WrappedVault.json new file mode 100644 index 000000000..6ab810ff1 --- /dev/null +++ b/sdk/contracts/146/contract-abis/WrappedVault.json @@ -0,0 +1,1028 @@ +{ + "abi": [ + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MAX_REWARDS", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_CAMPAIGN_DURATION", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "POINTS_FACTORY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract PointsFactory" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RPT_PRECISION", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "VAULT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IWrappedVault" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WRAPPED_VAULT_FACTORY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract WrappedVaultFactory" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addRewardsToken", + "inputs": [ + { "name": "rewardsToken", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { "name": "", "type": "address", "internalType": "address" }, + { "name": "", "type": "address", "internalType": "address" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { "name": "spender", "type": "address", "internalType": "address" }, + { "name": "amount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "asset", + "inputs": [], + "outputs": [ + { "name": "_asset", "type": "address", "internalType": "address" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cancelOwnershipHandover", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "reward", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claimFees", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "claimFees", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "reward", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "completeOwnershipHandover", + "inputs": [ + { "name": "pendingOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "convertToAssets", + "inputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "convertToShares", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "currentRewardsPerToken", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "currentUserRewards", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" }, + { "name": "user", "type": "address", "internalType": "address" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" }, + { "name": "receiver", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "extendRewardsInterval", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" }, + { + "name": "rewardsAdded", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "newEnd", "type": "uint256", "internalType": "uint256" }, + { + "name": "frontendFeeRecipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "frontendFee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { "name": "_owner", "type": "address", "internalType": "address" }, + { "name": "_name", "type": "string", "internalType": "string" }, + { "name": "_symbol", "type": "string", "internalType": "string" }, + { "name": "vault", "type": "address", "internalType": "address" }, + { + "name": "initialFrontendFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pointsFactory", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isReward", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maxDeposit", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [ + { "name": "maxAssets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maxMint", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [ + { "name": "maxShares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maxRedeem", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "maxShares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maxWithdraw", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "maxAssets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" }, + { "name": "receiver", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [{ "name": "", "type": "string", "internalType": "string" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { "name": "result", "type": "address", "internalType": "address" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerClaim", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "reward", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "ownershipHandoverExpiresAt", + "inputs": [ + { "name": "pendingOwner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "result", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" }, + { "name": "spender", "type": "address", "internalType": "address" }, + { "name": "value", "type": "uint256", "internalType": "uint256" }, + { "name": "deadline", "type": "uint256", "internalType": "uint256" }, + { "name": "v", "type": "uint8", "internalType": "uint8" }, + { "name": "r", "type": "bytes32", "internalType": "bytes32" }, + { "name": "s", "type": "bytes32", "internalType": "bytes32" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "previewDeposit", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewMint", + "inputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewRateAfterDeposit", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" }, + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewRedeem", + "inputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewWithdraw", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" }, + { "name": "receiver", "type": "address", "internalType": "address" }, + { "name": "owner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "refundRewardsInterval", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "requestOwnershipHandover", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "rewardToClaimantToFees", + "inputs": [ + { "name": "", "type": "address", "internalType": "address" }, + { "name": "", "type": "address", "internalType": "address" } + ], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewardToInterval", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [ + { "name": "start", "type": "uint32", "internalType": "uint32" }, + { "name": "end", "type": "uint32", "internalType": "uint32" }, + { "name": "rate", "type": "uint96", "internalType": "uint96" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewardToRPT", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [ + { "name": "accumulated", "type": "uint256", "internalType": "uint256" }, + { "name": "lastUpdated", "type": "uint32", "internalType": "uint32" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewardToUserToAR", + "inputs": [ + { "name": "", "type": "address", "internalType": "address" }, + { "name": "", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "accumulated", "type": "uint256", "internalType": "uint256" }, + { "name": "checkpoint", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewards", + "inputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeDeposit", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" }, + { "name": "receiver", "type": "address", "internalType": "address" }, + { "name": "minShares", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFrontendFee", + "inputs": [ + { + "name": "newFrontendFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setRewardsInterval", + "inputs": [ + { "name": "reward", "type": "address", "internalType": "address" }, + { "name": "start", "type": "uint256", "internalType": "uint256" }, + { "name": "end", "type": "uint256", "internalType": "uint256" }, + { + "name": "totalRewards", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "frontendFeeRecipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [{ "name": "", "type": "string", "internalType": "string" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalAssets", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "amount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { "name": "from", "type": "address", "internalType": "address" }, + { "name": "to", "type": "address", "internalType": "address" }, + { "name": "amount", "type": "uint256", "internalType": "uint256" } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { "name": "assets", "type": "uint256", "internalType": "uint256" }, + { "name": "receiver", "type": "address", "internalType": "address" }, + { "name": "owner", "type": "address", "internalType": "address" } + ], + "outputs": [ + { "name": "shares", "type": "uint256", "internalType": "uint256" } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Claimed", + "inputs": [ + { + "name": "reward", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "receiver", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "claimed", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "caller", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "assets", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesClaimed", + "inputs": [ + { + "name": "claimant", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "incentiveToken", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FrontendFeeUpdated", + "inputs": [ + { + "name": "frontendFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipHandoverCanceled", + "inputs": [ + { + "name": "pendingOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipHandoverRequested", + "inputs": [ + { + "name": "pendingOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "oldOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RewardsPerTokenUpdated", + "inputs": [ + { + "name": "reward", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "accumulated", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RewardsSet", + "inputs": [ + { + "name": "reward", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "start", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "end", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "rate", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "totalRewards", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "frontendFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RewardsTokenAdded", + "inputs": [ + { + "name": "reward", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UserRewardsUpdated", + "inputs": [ + { + "name": "reward", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "accumulated", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "checkpoint", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdraw", + "inputs": [ + { + "name": "caller", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "receiver", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "assets", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { "type": "error", "name": "AlreadyInitialized", "inputs": [] }, + { "type": "error", "name": "CannotShortenInterval", "inputs": [] }, + { "type": "error", "name": "DuplicateRewardToken", "inputs": [] }, + { "type": "error", "name": "FrontendFeeBelowMinimum", "inputs": [] }, + { "type": "error", "name": "IntervalEndBeforeStart", "inputs": [] }, + { "type": "error", "name": "IntervalEndInPast", "inputs": [] }, + { "type": "error", "name": "IntervalInProgress", "inputs": [] }, + { "type": "error", "name": "IntervalScheduled", "inputs": [] }, + { "type": "error", "name": "IntervalStartIsZero", "inputs": [] }, + { "type": "error", "name": "InvalidInitialization", "inputs": [] }, + { "type": "error", "name": "InvalidIntervalDuration", "inputs": [] }, + { "type": "error", "name": "InvalidReward", "inputs": [] }, + { "type": "error", "name": "InvalidWithdrawal", "inputs": [] }, + { "type": "error", "name": "MaxRewardsReached", "inputs": [] }, + { "type": "error", "name": "NewOwnerIsZeroAddress", "inputs": [] }, + { "type": "error", "name": "NoHandoverRequest", "inputs": [] }, + { "type": "error", "name": "NoIntervalInProgress", "inputs": [] }, + { "type": "error", "name": "NoZeroRateAllowed", "inputs": [] }, + { "type": "error", "name": "NotInitializing", "inputs": [] }, + { "type": "error", "name": "NotOwnerOfVaultOrApproved", "inputs": [] }, + { "type": "error", "name": "RateCannotDecrease", "inputs": [] }, + { "type": "error", "name": "TooFewShares", "inputs": [] }, + { "type": "error", "name": "Unauthorized", "inputs": [] }, + { + "type": "error", + "name": "VaultNotAuthorizedToRewardPoints", + "inputs": [] + } + ] +} diff --git a/sdk/contracts/146/contract-abis/WrappedVaultFactory.json b/sdk/contracts/146/contract-abis/WrappedVaultFactory.json new file mode 100644 index 000000000..22acdce6a --- /dev/null +++ b/sdk/contracts/146/contract-abis/WrappedVaultFactory.json @@ -0,0 +1,372 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_wrappedVaultImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "_protocolFeeRecipient", + "type": "address", + "internalType": "address" + }, + { + "name": "_protocolFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_minimumFrontendFee", + "type": "uint256", + "internalType": "uint256" + }, + { "name": "_owner", "type": "address", "internalType": "address" }, + { + "name": "_pointsFactory", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "MAX_MIN_REFERRAL_FEE", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MAX_PROTOCOL_FEE", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "incentivizedVaults", + "inputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isVault", + "inputs": [{ "name": "", "type": "address", "internalType": "address" }], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumFrontendFee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pointsFactory", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFeeRecipient", + "inputs": [], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { "name": "newOwner", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateMinimumReferralFee", + "inputs": [ + { + "name": "newMinimumReferralFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "updateProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "updateProtocolFeeRecipient", + "inputs": [ + { "name": "newRecipient", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "updateWrappedVaultImplementation", + "inputs": [ + { + "name": "newWrappedVaultImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "wrapVault", + "inputs": [ + { + "name": "vault", + "type": "address", + "internalType": "contract ERC4626" + }, + { "name": "owner", "type": "address", "internalType": "address" }, + { "name": "name", "type": "string", "internalType": "string" }, + { + "name": "initialFrontendFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "wrappedVault", + "type": "address", + "internalType": "contract WrappedVault" + } + ], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeRecipientUpdated", + "inputs": [ + { + "name": "newRecipient", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ReferralFeeUpdated", + "inputs": [ + { + "name": "newReferralFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WrappedVaultCreated", + "inputs": [ + { + "name": "underlyingVaultAddress", + "type": "address", + "indexed": true, + "internalType": "contract ERC4626" + }, + { + "name": "incentivizedVaultAddress", + "type": "address", + "indexed": true, + "internalType": "contract WrappedVault" + }, + { + "name": "owner", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "inputToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "frontendFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "name", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "vaultSymbol", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WrappedVaultImplementationUpdated", + "inputs": [ + { + "name": "newWrappedVaultImplementation", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { "type": "error", "name": "FailedDeployment", "inputs": [] }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [ + { "name": "balance", "type": "uint256", "internalType": "uint256" }, + { "name": "needed", "type": "uint256", "internalType": "uint256" } + ] + }, + { + "type": "error", + "name": "InvalidWrappedVaultImplementation", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { "name": "owner", "type": "address", "internalType": "address" } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { "name": "account", "type": "address", "internalType": "address" } + ] + }, + { "type": "error", "name": "ProtocolFeeTooHigh", "inputs": [] }, + { "type": "error", "name": "ReferralFeeTooHigh", "inputs": [] } + ] +} diff --git a/sdk/contracts/146/contract-abis/index.tsx b/sdk/contracts/146/contract-abis/index.tsx new file mode 100644 index 000000000..3b6b52d51 --- /dev/null +++ b/sdk/contracts/146/contract-abis/index.tsx @@ -0,0 +1,17 @@ +import WrappedVaultMetadata from "./WrappedVault.json"; +import WrappedVaultFactoryMetadata from "./WrappedVaultFactory.json"; +import PointsFactoryMetadata from "./PointsFactory.json"; +import RecipeMarketHubMetadata from "./RecipeMarketHub.json"; +import VaultMarketHubMetadata from "./VaultMarketHub.json"; +import WeirollWalletMetadata from "./WeirollWallet.json"; +import WeirollWalletHelperMetadata from "./WeirollWalletHelper.json"; + +export const ContractAbis = { + WrappedVault: WrappedVaultMetadata.abi, + WrappedVaultFactory: WrappedVaultFactoryMetadata.abi, + PointsFactory: PointsFactoryMetadata.abi, + RecipeMarketHub: RecipeMarketHubMetadata.abi, + VaultMarketHub: VaultMarketHubMetadata.abi, + WeirollWallet: WeirollWalletMetadata.abi, + WeirollWalletHelper: WeirollWalletHelperMetadata.abi, +}; diff --git a/sdk/contracts/146/contract-addresses/index.tsx b/sdk/contracts/146/contract-addresses/index.tsx new file mode 100644 index 000000000..068f274bf --- /dev/null +++ b/sdk/contracts/146/contract-addresses/index.tsx @@ -0,0 +1,15 @@ +/** + * @note Contracts haven't been deployed yet -- these are just placeholders + */ + +import { Address } from "abitype"; + +export const ContractAddresses = { + WrappedVault: "0xb0a3960b115e0999f33e8afd4a11f16e04e2bf33", + WrappedVaultFactory: "0x75e502644284edf34421f9c355d75db79e343bca", + PointsFactory: "0x19112adbdafb465ddf0b57ecc07e68110ad09c50", + RecipeMarketHub: "0x783251f103555068c1e9d755f69458f39ed937c0", + VaultMarketHub: "0xa97ecc6bfda40baf2fdd096dd33e88bd8e769280", + WeirollWallet: "0x40a1c08084671e9a799b73853e82308225309dc0", + WeirollWalletHelper: "0x07899ac8be7462151d6515fcd4773dd9267c9911", +} as Record; diff --git a/sdk/contracts/146/index.tsx b/sdk/contracts/146/index.tsx new file mode 100644 index 000000000..031262b6c --- /dev/null +++ b/sdk/contracts/146/index.tsx @@ -0,0 +1,43 @@ +import { ContractAddresses } from "./contract-addresses"; +import { ContractAbis } from "./contract-abis"; +import { NULL_ADDRESS } from "@/sdk/constants"; +import { erc20Abi, erc4626Abi } from "viem"; + +export const Contracts = { + WrappedVault: { + address: ContractAddresses.WrappedVault, + abi: ContractAbis.WrappedVault, + }, + WrappedVaultFactory: { + address: ContractAddresses.WrappedVaultFactory, + abi: ContractAbis.WrappedVaultFactory, + }, + PointsFactory: { + address: ContractAddresses.PointsFactory, + abi: ContractAbis.PointsFactory, + }, + RecipeMarketHub: { + address: ContractAddresses.RecipeMarketHub, + abi: ContractAbis.RecipeMarketHub, + }, + VaultMarketHub: { + address: ContractAddresses.VaultMarketHub, + abi: ContractAbis.VaultMarketHub, + }, + WeirollWallet: { + address: ContractAddresses.WeirollWallet, + abi: ContractAbis.WeirollWallet, + }, + Erc20: { + address: NULL_ADDRESS, + abi: erc20Abi, + }, + Erc4626: { + address: NULL_ADDRESS, + abi: erc4626Abi, + }, + WeirollWalletHelper: { + address: ContractAddresses.WeirollWalletHelper, + abi: ContractAbis.WeirollWalletHelper, + }, +};