diff --git a/Templates/liquity-dev-frontend/.dockerignore b/Templates/liquity-dev-frontend/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/Templates/liquity-dev-frontend/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Templates/liquity-dev-frontend/.gitignore b/Templates/liquity-dev-frontend/.gitignore new file mode 100644 index 0000000..da5ad82 --- /dev/null +++ b/Templates/liquity-dev-frontend/.gitignore @@ -0,0 +1,30 @@ +/public/config.json +/build +/.env +/config.json +# Editor temp files +*~ + +# macOS Finder attribute files +.DS_Store + +node_modules + +# output of TypeScript transpilation +/packages/*/dist + +# api-extractor temp files +/packages/*/temp + +/temp +.env +.eslintcache + +# Don't track NPM lockfile (we use Yarn) +package-lock.json + +# Don't track hardhat mainnet fork cache +cache + +# ngrok config is individual to each dev +ngrok.config.yml diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/goerli.json b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/goerli.json new file mode 100644 index 0000000..a154002 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/goerli.json @@ -0,0 +1,9 @@ +{ + "BLUSD_AMM_ADDRESS": "0x3CD3A41F2Bee1CbeC78378Eb99F272BaA4C3a752", + "BLUSD_AMM_STAKING_ADDRESS": "0x4f706C498ccF5cDbFd2e5a146eb69AD32350a260", + "BLUSD_TOKEN_ADDRESS": "0xC74A4D1763CB0505BbB03805388b8539EAf3c7E7", + "BOND_NFT_ADDRESS": "0x4592092cf3bAA43C2bEbe3e0f337624e170A20d7", + "CHICKEN_BOND_MANAGER_ADDRESS": "0xDC1e396D7CCB4F123edD76f83991f7Ca0E8d7318", + "LUSD_OVERRIDE_ADDRESS": "0x358D68731192e5dCf3DaC1Ff5239824D5fbB9Bd4", + "BLUSD_LP_ZAP_ADDRESS": null +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.d.ts new file mode 100644 index 0000000..9b94231 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.d.ts @@ -0,0 +1,3 @@ +import mainnet from './mainnet.json'; +import goerli from './goerli.json'; +export { mainnet, goerli }; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.js new file mode 100644 index 0000000..5ecd5ca --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/index.js @@ -0,0 +1,10 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.goerli = exports.mainnet = void 0; +const mainnet_json_1 = __importDefault(require("./mainnet.json")); +exports.mainnet = mainnet_json_1.default; +const goerli_json_1 = __importDefault(require("./goerli.json")); +exports.goerli = goerli_json_1.default; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/mainnet.json b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/mainnet.json new file mode 100644 index 0000000..bd1b78e --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/addresses/mainnet.json @@ -0,0 +1,9 @@ +{ + "BLUSD_AMM_ADDRESS": "0x74ED5d42203806c8CDCf2F04Ca5F60DC777b901c", + "BLUSD_AMM_STAKING_ADDRESS": "0xdA0DD1798BE66E17d5aB1Dc476302b56689C2DB4", + "BLUSD_TOKEN_ADDRESS": "0xB9D7DdDca9a4AC480991865EfEf82E01273F79C3", + "BOND_NFT_ADDRESS": "0xa8384862219188a8f03c144953Cf21fc124029Ee", + "CHICKEN_BOND_MANAGER_ADDRESS": "0x57619FE9C539f890b19c61812226F9703ce37137", + "LUSD_OVERRIDE_ADDRESS": null, + "BLUSD_LP_ZAP_ADDRESS": "0xcba8E52AB11b3209aB55E28622371d9877058d30" +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.d.ts new file mode 100644 index 0000000..ad047d0 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.d.ts @@ -0,0 +1,192 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface BLUSDLPZapInterface extends utils.Interface { + functions: { + "addLiquidity(uint256,uint256,uint256)": FunctionFragment; + "addLiquidityAndStake(uint256,uint256,uint256)": FunctionFragment; + "bLUSDGauge()": FunctionFragment; + "bLUSDLUSD3CRVLPToken()": FunctionFragment; + "bLUSDLUSD3CRVPool()": FunctionFragment; + "bLUSDToken()": FunctionFragment; + "getMinLPTokens(uint256,uint256)": FunctionFragment; + "getMinWithdrawBalanced(uint256)": FunctionFragment; + "getMinWithdrawLUSD(uint256)": FunctionFragment; + "lusd3CRVPool()": FunctionFragment; + "lusdToken()": FunctionFragment; + "removeLiquidityBalanced(uint256,uint256,uint256)": FunctionFragment; + "removeLiquidityLUSD(uint256,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "addLiquidity" | "addLiquidityAndStake" | "bLUSDGauge" | "bLUSDLUSD3CRVLPToken" | "bLUSDLUSD3CRVPool" | "bLUSDToken" | "getMinLPTokens" | "getMinWithdrawBalanced" | "getMinWithdrawLUSD" | "lusd3CRVPool" | "lusdToken" | "removeLiquidityBalanced" | "removeLiquidityLUSD"): FunctionFragment; + encodeFunctionData(functionFragment: "addLiquidity", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "addLiquidityAndStake", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "bLUSDGauge", values?: undefined): string; + encodeFunctionData(functionFragment: "bLUSDLUSD3CRVLPToken", values?: undefined): string; + encodeFunctionData(functionFragment: "bLUSDLUSD3CRVPool", values?: undefined): string; + encodeFunctionData(functionFragment: "bLUSDToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getMinLPTokens", values: [BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "getMinWithdrawBalanced", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getMinWithdrawLUSD", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "lusd3CRVPool", values?: undefined): string; + encodeFunctionData(functionFragment: "lusdToken", values?: undefined): string; + encodeFunctionData(functionFragment: "removeLiquidityBalanced", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "removeLiquidityLUSD", values: [BigNumberish, BigNumberish]): string; + decodeFunctionResult(functionFragment: "addLiquidity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addLiquidityAndStake", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bLUSDGauge", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bLUSDLUSD3CRVLPToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bLUSDLUSD3CRVPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bLUSDToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMinLPTokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMinWithdrawBalanced", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMinWithdrawLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lusd3CRVPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lusdToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeLiquidityBalanced", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeLiquidityLUSD", data: BytesLike): Result; + events: {}; +} +export interface BLUSDLPZap extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BLUSDLPZapInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addLiquidity(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addLiquidityAndStake(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDGauge(overrides?: CallOverrides): Promise<[string]>; + bLUSDLUSD3CRVLPToken(overrides?: CallOverrides): Promise<[string]>; + bLUSDLUSD3CRVPool(overrides?: CallOverrides): Promise<[string]>; + bLUSDToken(overrides?: CallOverrides): Promise<[string]>; + getMinLPTokens(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + bLUSDLUSD3CRVTokens: BigNumber; + }>; + getMinWithdrawBalanced(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber + ] & { + bLUSDAmount: BigNumber; + lusdAmount: BigNumber; + }>; + getMinWithdrawLUSD(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + lusdAmount: BigNumber; + }>; + lusd3CRVPool(overrides?: CallOverrides): Promise<[string]>; + lusdToken(overrides?: CallOverrides): Promise<[string]>; + removeLiquidityBalanced(_lpAmount: BigNumberish, _minBLUSD: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeLiquidityLUSD(_lpAmount: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + addLiquidity(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addLiquidityAndStake(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDGauge(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVLPToken(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVPool(overrides?: CallOverrides): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + getMinLPTokens(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawBalanced(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber + ] & { + bLUSDAmount: BigNumber; + lusdAmount: BigNumber; + }>; + getMinWithdrawLUSD(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + lusd3CRVPool(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + removeLiquidityBalanced(_lpAmount: BigNumberish, _minBLUSD: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeLiquidityLUSD(_lpAmount: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + addLiquidity(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: CallOverrides): Promise; + addLiquidityAndStake(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: CallOverrides): Promise; + bLUSDGauge(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVLPToken(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVPool(overrides?: CallOverrides): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + getMinLPTokens(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawBalanced(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber + ] & { + bLUSDAmount: BigNumber; + lusdAmount: BigNumber; + }>; + getMinWithdrawLUSD(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + lusd3CRVPool(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + removeLiquidityBalanced(_lpAmount: BigNumberish, _minBLUSD: BigNumberish, _minLUSD: BigNumberish, overrides?: CallOverrides): Promise; + removeLiquidityLUSD(_lpAmount: BigNumberish, _minLUSD: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + addLiquidity(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addLiquidityAndStake(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDGauge(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVLPToken(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVPool(overrides?: CallOverrides): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + getMinLPTokens(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawBalanced(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawLUSD(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + lusd3CRVPool(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + removeLiquidityBalanced(_lpAmount: BigNumberish, _minBLUSD: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeLiquidityLUSD(_lpAmount: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + addLiquidity(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addLiquidityAndStake(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, _minLPTokens: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDGauge(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVLPToken(overrides?: CallOverrides): Promise; + bLUSDLUSD3CRVPool(overrides?: CallOverrides): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + getMinLPTokens(_bLUSDAmount: BigNumberish, _lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawBalanced(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + getMinWithdrawLUSD(_lpAmount: BigNumberish, overrides?: CallOverrides): Promise; + lusd3CRVPool(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + removeLiquidityBalanced(_lpAmount: BigNumberish, _minBLUSD: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeLiquidityLUSD(_lpAmount: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDLPZap.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.d.ts new file mode 100644 index 0000000..13fba76 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.d.ts @@ -0,0 +1,303 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface BLUSDTokenInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(address,uint256)": FunctionFragment; + "chickenBondManagerAddress()": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setAddresses(address)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "allowance" | "approve" | "balanceOf" | "burn" | "chickenBondManagerAddress" | "decimals" | "decreaseAllowance" | "increaseAllowance" | "mint" | "name" | "owner" | "renounceOwnership" | "setAddresses" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "transferOwnership"): FunctionFragment; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "burn", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "chickenBondManagerAddress", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "mint", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "setAddresses", values: [string]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [string]): string; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chickenBondManagerAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAddresses", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], ApprovalEventObject>; +export declare type ApprovalEventFilter = TypedEventFilter; +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export declare type OwnershipTransferredEvent = TypedEvent<[ + string, + string +], OwnershipTransferredEventObject>; +export declare type OwnershipTransferredEventFilter = TypedEventFilter; +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], TransferEventObject>; +export declare type TransferEventFilter = TypedEventFilter; +export interface BLUSDToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BLUSDTokenInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + burn(_from: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenBondManagerAddress(overrides?: CallOverrides): Promise<[string]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + mint(_to: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + owner(overrides?: CallOverrides): Promise<[string]>; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + burn(_from: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenBondManagerAddress(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + mint(_to: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + burn(_from: string, _bLUSDAmount: BigNumberish, overrides?: CallOverrides): Promise; + chickenBondManagerAddress(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: CallOverrides): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: CallOverrides): Promise; + mint(_to: string, _bLUSDAmount: BigNumberish, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + "OwnershipTransferred(address,address)"(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + }; + estimateGas: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + burn(_from: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenBondManagerAddress(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + mint(_to: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + burn(_from: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenBondManagerAddress(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + mint(_to: string, _bLUSDAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BLUSDToken.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.d.ts new file mode 100644 index 0000000..9a59186 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.d.ts @@ -0,0 +1,627 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export declare namespace BondNFT { + type LiquityDataAddressesStruct = { + troveManagerAddress: string; + lqtyToken: string; + lqtyStaking: string; + pickleLQTYJar: string; + pickleLQTYFarm: string; + curveGaugeController: string; + curveLUSD3CRVGauge: string; + curveLUSDFRAXGauge: string; + }; + type LiquityDataAddressesStructOutput = [ + string, + string, + string, + string, + string, + string, + string, + string + ] & { + troveManagerAddress: string; + lqtyToken: string; + lqtyStaking: string; + pickleLQTYJar: string; + pickleLQTYFarm: string; + curveGaugeController: string; + curveLUSD3CRVGauge: string; + curveLUSDFRAXGauge: string; + }; +} +export interface BondNFTInterface extends utils.Interface { + functions: { + "CURVE_GAUGE_SLOPES_PRECISION()": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "artwork()": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "chickenBondManager()": FunctionFragment; + "curveGaugeController()": FunctionFragment; + "curveLUSD3CRVGauge()": FunctionFragment; + "curveLUSDFRAXGauge()": FunctionFragment; + "getApproved(uint256)": FunctionFragment; + "getBondAmount(uint256)": FunctionFragment; + "getBondClaimedBLUSD(uint256)": FunctionFragment; + "getBondEndTime(uint256)": FunctionFragment; + "getBondExtraData(uint256)": FunctionFragment; + "getBondFinalDna(uint256)": FunctionFragment; + "getBondFinalHalfDna(uint256)": FunctionFragment; + "getBondInitialDna(uint256)": FunctionFragment; + "getBondInitialHalfDna(uint256)": FunctionFragment; + "getBondStartTime(uint256)": FunctionFragment; + "getBondStatus(uint256)": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "lqtyStaking()": FunctionFragment; + "lqtyToken()": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "owner()": FunctionFragment; + "ownerOf(uint256)": FunctionFragment; + "pickleLQTYFarm()": FunctionFragment; + "pickleLQTYJar()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "safeTransferFrom(address,address,uint256)": FunctionFragment; + "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; + "setAddresses(address)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "setArtworkAddress(address)": FunctionFragment; + "setFinalExtraData(address,uint256,uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "symbol()": FunctionFragment; + "tokenByIndex(uint256)": FunctionFragment; + "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; + "tokenURI(uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transferLockoutPeriodSeconds()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "troveManager()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "CURVE_GAUGE_SLOPES_PRECISION" | "approve" | "artwork" | "balanceOf" | "chickenBondManager" | "curveGaugeController" | "curveLUSD3CRVGauge" | "curveLUSDFRAXGauge" | "getApproved" | "getBondAmount" | "getBondClaimedBLUSD" | "getBondEndTime" | "getBondExtraData" | "getBondFinalDna" | "getBondFinalHalfDna" | "getBondInitialDna" | "getBondInitialHalfDna" | "getBondStartTime" | "getBondStatus" | "isApprovedForAll" | "lqtyStaking" | "lqtyToken" | "mint" | "name" | "owner" | "ownerOf" | "pickleLQTYFarm" | "pickleLQTYJar" | "renounceOwnership" | "safeTransferFrom(address,address,uint256)" | "safeTransferFrom(address,address,uint256,bytes)" | "setAddresses" | "setApprovalForAll" | "setArtworkAddress" | "setFinalExtraData" | "supportsInterface" | "symbol" | "tokenByIndex" | "tokenOfOwnerByIndex" | "tokenURI" | "totalSupply" | "transferFrom" | "transferLockoutPeriodSeconds" | "transferOwnership" | "troveManager"): FunctionFragment; + encodeFunctionData(functionFragment: "CURVE_GAUGE_SLOPES_PRECISION", values?: undefined): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "artwork", values?: undefined): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "chickenBondManager", values?: undefined): string; + encodeFunctionData(functionFragment: "curveGaugeController", values?: undefined): string; + encodeFunctionData(functionFragment: "curveLUSD3CRVGauge", values?: undefined): string; + encodeFunctionData(functionFragment: "curveLUSDFRAXGauge", values?: undefined): string; + encodeFunctionData(functionFragment: "getApproved", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondAmount", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondClaimedBLUSD", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondEndTime", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondExtraData", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondFinalDna", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondFinalHalfDna", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondInitialDna", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondInitialHalfDna", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondStartTime", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getBondStatus", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "isApprovedForAll", values: [string, string]): string; + encodeFunctionData(functionFragment: "lqtyStaking", values?: undefined): string; + encodeFunctionData(functionFragment: "lqtyToken", values?: undefined): string; + encodeFunctionData(functionFragment: "mint", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "ownerOf", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "pickleLQTYFarm", values?: undefined): string; + encodeFunctionData(functionFragment: "pickleLQTYJar", values?: undefined): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "safeTransferFrom(address,address,uint256)", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "safeTransferFrom(address,address,uint256,bytes)", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "setAddresses", values: [string]): string; + encodeFunctionData(functionFragment: "setApprovalForAll", values: [string, boolean]): string; + encodeFunctionData(functionFragment: "setArtworkAddress", values: [string]): string; + encodeFunctionData(functionFragment: "setFinalExtraData", values: [string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "tokenByIndex", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "tokenOfOwnerByIndex", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "tokenURI", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferLockoutPeriodSeconds", values?: undefined): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [string]): string; + encodeFunctionData(functionFragment: "troveManager", values?: undefined): string; + decodeFunctionResult(functionFragment: "CURVE_GAUGE_SLOPES_PRECISION", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "artwork", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chickenBondManager", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveGaugeController", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveLUSD3CRVGauge", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveLUSDFRAXGauge", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getApproved", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondAmount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondClaimedBLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondEndTime", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondExtraData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondFinalDna", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondFinalHalfDna", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondInitialDna", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondInitialHalfDna", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondStartTime", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondStatus", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isApprovedForAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lqtyStaking", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lqtyToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pickleLQTYFarm", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pickleLQTYJar", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256,bytes)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAddresses", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setApprovalForAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setArtworkAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setFinalExtraData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokenByIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokenOfOwnerByIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokenURI", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferLockoutPeriodSeconds", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "troveManager", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "ApprovalForAll(address,address,bool)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export interface ApprovalEventObject { + owner: string; + approved: string; + tokenId: BigNumber; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], ApprovalEventObject>; +export declare type ApprovalEventFilter = TypedEventFilter; +export interface ApprovalForAllEventObject { + owner: string; + operator: string; + approved: boolean; +} +export declare type ApprovalForAllEvent = TypedEvent<[ + string, + string, + boolean +], ApprovalForAllEventObject>; +export declare type ApprovalForAllEventFilter = TypedEventFilter; +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export declare type OwnershipTransferredEvent = TypedEvent<[ + string, + string +], OwnershipTransferredEventObject>; +export declare type OwnershipTransferredEventFilter = TypedEventFilter; +export interface TransferEventObject { + from: string; + to: string; + tokenId: BigNumber; +} +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], TransferEventObject>; +export declare type TransferEventFilter = TypedEventFilter; +export interface BondNFT extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BondNFTInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + CURVE_GAUGE_SLOPES_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + approve(to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + artwork(overrides?: CallOverrides): Promise<[string]>; + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + chickenBondManager(overrides?: CallOverrides): Promise<[string]>; + curveGaugeController(overrides?: CallOverrides): Promise<[string]>; + curveLUSD3CRVGauge(overrides?: CallOverrides): Promise<[string]>; + curveLUSDFRAXGauge(overrides?: CallOverrides): Promise<[string]>; + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + getBondAmount(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + amount: BigNumber; + }>; + getBondClaimedBLUSD(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + claimedBLUSD: BigNumber; + }>; + getBondEndTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + endTime: BigNumber; + }>; + getBondExtraData(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + number, + number, + number + ] & { + initialHalfDna: BigNumber; + finalHalfDna: BigNumber; + troveSize: number; + lqtyAmount: number; + curveGaugeSlopes: number; + }>; + getBondFinalDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + finalDna: BigNumber; + }>; + getBondFinalHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + finalHalfDna: BigNumber; + }>; + getBondInitialDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + initialDna: BigNumber; + }>; + getBondInitialHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + initialHalfDna: BigNumber; + }>; + getBondStartTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber] & { + startTime: BigNumber; + }>; + getBondStatus(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[number] & { + status: number; + }>; + isApprovedForAll(owner: string, operator: string, overrides?: CallOverrides): Promise<[boolean]>; + lqtyStaking(overrides?: CallOverrides): Promise<[string]>; + lqtyToken(overrides?: CallOverrides): Promise<[string]>; + mint(_bonder: string, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + owner(overrides?: CallOverrides): Promise<[string]>; + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + pickleLQTYFarm(overrides?: CallOverrides): Promise<[string]>; + pickleLQTYJar(overrides?: CallOverrides): Promise<[string]>; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256)"(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256,bytes)"(from: string, to: string, tokenId: BigNumberish, _data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setArtworkAddress(_artworkAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setFinalExtraData(_bonder: string, _tokenID: BigNumberish, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + tokenByIndex(index: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + tokenOfOwnerByIndex(owner: string, index: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + tokenURI(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferLockoutPeriodSeconds(overrides?: CallOverrides): Promise<[BigNumber]>; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + troveManager(overrides?: CallOverrides): Promise<[string]>; + }; + CURVE_GAUGE_SLOPES_PRECISION(overrides?: CallOverrides): Promise; + approve(to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + artwork(overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + chickenBondManager(overrides?: CallOverrides): Promise; + curveGaugeController(overrides?: CallOverrides): Promise; + curveLUSD3CRVGauge(overrides?: CallOverrides): Promise; + curveLUSDFRAXGauge(overrides?: CallOverrides): Promise; + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + getBondAmount(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondClaimedBLUSD(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondEndTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondExtraData(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + number, + number, + number + ] & { + initialHalfDna: BigNumber; + finalHalfDna: BigNumber; + troveSize: number; + lqtyAmount: number; + curveGaugeSlopes: number; + }>; + getBondFinalDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStartTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStatus(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + isApprovedForAll(owner: string, operator: string, overrides?: CallOverrides): Promise; + lqtyStaking(overrides?: CallOverrides): Promise; + lqtyToken(overrides?: CallOverrides): Promise; + mint(_bonder: string, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + pickleLQTYFarm(overrides?: CallOverrides): Promise; + pickleLQTYJar(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256)"(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256,bytes)"(from: string, to: string, tokenId: BigNumberish, _data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setArtworkAddress(_artworkAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setFinalExtraData(_bonder: string, _tokenID: BigNumberish, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + tokenByIndex(index: BigNumberish, overrides?: CallOverrides): Promise; + tokenOfOwnerByIndex(owner: string, index: BigNumberish, overrides?: CallOverrides): Promise; + tokenURI(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferLockoutPeriodSeconds(overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + troveManager(overrides?: CallOverrides): Promise; + callStatic: { + CURVE_GAUGE_SLOPES_PRECISION(overrides?: CallOverrides): Promise; + approve(to: string, tokenId: BigNumberish, overrides?: CallOverrides): Promise; + artwork(overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + chickenBondManager(overrides?: CallOverrides): Promise; + curveGaugeController(overrides?: CallOverrides): Promise; + curveLUSD3CRVGauge(overrides?: CallOverrides): Promise; + curveLUSDFRAXGauge(overrides?: CallOverrides): Promise; + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + getBondAmount(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondClaimedBLUSD(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondEndTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondExtraData(_tokenID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + number, + number, + number + ] & { + initialHalfDna: BigNumber; + finalHalfDna: BigNumber; + troveSize: number; + lqtyAmount: number; + curveGaugeSlopes: number; + }>; + getBondFinalDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStartTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStatus(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + isApprovedForAll(owner: string, operator: string, overrides?: CallOverrides): Promise; + lqtyStaking(overrides?: CallOverrides): Promise; + lqtyToken(overrides?: CallOverrides): Promise; + mint(_bonder: string, _permanentSeed: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber, BigNumber]>; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + pickleLQTYFarm(overrides?: CallOverrides): Promise; + pickleLQTYJar(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; + "safeTransferFrom(address,address,uint256)"(from: string, to: string, tokenId: BigNumberish, overrides?: CallOverrides): Promise; + "safeTransferFrom(address,address,uint256,bytes)"(from: string, to: string, tokenId: BigNumberish, _data: BytesLike, overrides?: CallOverrides): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: CallOverrides): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: CallOverrides): Promise; + setArtworkAddress(_artworkAddress: string, overrides?: CallOverrides): Promise; + setFinalExtraData(_bonder: string, _tokenID: BigNumberish, _permanentSeed: BigNumberish, overrides?: CallOverrides): Promise; + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + tokenByIndex(index: BigNumberish, overrides?: CallOverrides): Promise; + tokenOfOwnerByIndex(owner: string, index: BigNumberish, overrides?: CallOverrides): Promise; + tokenURI(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: CallOverrides): Promise; + transferLockoutPeriodSeconds(overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: CallOverrides): Promise; + troveManager(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, approved?: string | null, tokenId?: BigNumberish | null): ApprovalEventFilter; + Approval(owner?: string | null, approved?: string | null, tokenId?: BigNumberish | null): ApprovalEventFilter; + "ApprovalForAll(address,address,bool)"(owner?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; + ApprovalForAll(owner?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; + "OwnershipTransferred(address,address)"(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, tokenId?: BigNumberish | null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, tokenId?: BigNumberish | null): TransferEventFilter; + }; + estimateGas: { + CURVE_GAUGE_SLOPES_PRECISION(overrides?: CallOverrides): Promise; + approve(to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + artwork(overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + chickenBondManager(overrides?: CallOverrides): Promise; + curveGaugeController(overrides?: CallOverrides): Promise; + curveLUSD3CRVGauge(overrides?: CallOverrides): Promise; + curveLUSDFRAXGauge(overrides?: CallOverrides): Promise; + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + getBondAmount(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondClaimedBLUSD(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondEndTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondExtraData(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStartTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStatus(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + isApprovedForAll(owner: string, operator: string, overrides?: CallOverrides): Promise; + lqtyStaking(overrides?: CallOverrides): Promise; + lqtyToken(overrides?: CallOverrides): Promise; + mint(_bonder: string, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + pickleLQTYFarm(overrides?: CallOverrides): Promise; + pickleLQTYJar(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256)"(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256,bytes)"(from: string, to: string, tokenId: BigNumberish, _data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setArtworkAddress(_artworkAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setFinalExtraData(_bonder: string, _tokenID: BigNumberish, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + tokenByIndex(index: BigNumberish, overrides?: CallOverrides): Promise; + tokenOfOwnerByIndex(owner: string, index: BigNumberish, overrides?: CallOverrides): Promise; + tokenURI(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferLockoutPeriodSeconds(overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + troveManager(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + CURVE_GAUGE_SLOPES_PRECISION(overrides?: CallOverrides): Promise; + approve(to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + artwork(overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + chickenBondManager(overrides?: CallOverrides): Promise; + curveGaugeController(overrides?: CallOverrides): Promise; + curveLUSD3CRVGauge(overrides?: CallOverrides): Promise; + curveLUSDFRAXGauge(overrides?: CallOverrides): Promise; + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + getBondAmount(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondClaimedBLUSD(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondEndTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondExtraData(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondFinalHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondInitialHalfDna(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStartTime(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + getBondStatus(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + isApprovedForAll(owner: string, operator: string, overrides?: CallOverrides): Promise; + lqtyStaking(overrides?: CallOverrides): Promise; + lqtyToken(overrides?: CallOverrides): Promise; + mint(_bonder: string, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + pickleLQTYFarm(overrides?: CallOverrides): Promise; + pickleLQTYJar(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256)"(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "safeTransferFrom(address,address,uint256,bytes)"(from: string, to: string, tokenId: BigNumberish, _data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAddresses(_chickenBondManagerAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setArtworkAddress(_artworkAddress: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setFinalExtraData(_bonder: string, _tokenID: BigNumberish, _permanentSeed: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + tokenByIndex(index: BigNumberish, overrides?: CallOverrides): Promise; + tokenOfOwnerByIndex(owner: string, index: BigNumberish, overrides?: CallOverrides): Promise; + tokenURI(_tokenID: BigNumberish, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferLockoutPeriodSeconds(overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + troveManager(overrides?: CallOverrides): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/BondNFT.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.d.ts new file mode 100644 index 0000000..316c235 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.d.ts @@ -0,0 +1,1001 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export declare namespace ChickenBondManager { + type ExternalAdressesStruct = { + bondNFTAddress: string; + lusdTokenAddress: string; + curvePoolAddress: string; + curveBasePoolAddress: string; + bammSPVaultAddress: string; + yearnCurveVaultAddress: string; + yearnRegistryAddress: string; + yearnGovernanceAddress: string; + bLUSDTokenAddress: string; + curveLiquidityGaugeAddress: string; + }; + type ExternalAdressesStructOutput = [ + string, + string, + string, + string, + string, + string, + string, + string, + string, + string + ] & { + bondNFTAddress: string; + lusdTokenAddress: string; + curvePoolAddress: string; + curveBasePoolAddress: string; + bammSPVaultAddress: string; + yearnCurveVaultAddress: string; + yearnRegistryAddress: string; + yearnGovernanceAddress: string; + bLUSDTokenAddress: string; + curveLiquidityGaugeAddress: string; + }; + type ParamsStruct = { + targetAverageAgeSeconds: BigNumberish; + initialAccrualParameter: BigNumberish; + minimumAccrualParameter: BigNumberish; + accrualAdjustmentRate: BigNumberish; + accrualAdjustmentPeriodSeconds: BigNumberish; + chickenInAMMFee: BigNumberish; + curveDepositDydxThreshold: BigNumberish; + curveWithdrawalDxdyThreshold: BigNumberish; + bootstrapPeriodChickenIn: BigNumberish; + bootstrapPeriodRedeem: BigNumberish; + bootstrapPeriodShift: BigNumberish; + shifterDelay: BigNumberish; + shifterWindow: BigNumberish; + minBLUSDSupply: BigNumberish; + minBondAmount: BigNumberish; + nftRandomnessDivisor: BigNumberish; + redemptionFeeBeta: BigNumberish; + redemptionFeeMinuteDecayFactor: BigNumberish; + }; + type ParamsStructOutput = [ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + targetAverageAgeSeconds: BigNumber; + initialAccrualParameter: BigNumber; + minimumAccrualParameter: BigNumber; + accrualAdjustmentRate: BigNumber; + accrualAdjustmentPeriodSeconds: BigNumber; + chickenInAMMFee: BigNumber; + curveDepositDydxThreshold: BigNumber; + curveWithdrawalDxdyThreshold: BigNumber; + bootstrapPeriodChickenIn: BigNumber; + bootstrapPeriodRedeem: BigNumber; + bootstrapPeriodShift: BigNumber; + shifterDelay: BigNumber; + shifterWindow: BigNumber; + minBLUSDSupply: BigNumber; + minBondAmount: BigNumber; + nftRandomnessDivisor: BigNumber; + redemptionFeeBeta: BigNumber; + redemptionFeeMinuteDecayFactor: BigNumber; + }; +} +export interface ChickenBondManagerInterface extends utils.Interface { + functions: { + "BETA()": FunctionFragment; + "BOOTSTRAP_PERIOD_CHICKEN_IN()": FunctionFragment; + "BOOTSTRAP_PERIOD_REDEEM()": FunctionFragment; + "BOOTSTRAP_PERIOD_SHIFT()": FunctionFragment; + "CHICKEN_IN_AMM_FEE()": FunctionFragment; + "DECIMAL_PRECISION()": FunctionFragment; + "INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL()": FunctionFragment; + "MINUTE_DECAY_FACTOR()": FunctionFragment; + "MIN_BLUSD_SUPPLY()": FunctionFragment; + "MIN_BOND_AMOUNT()": FunctionFragment; + "NFT_RANDOMNESS_DIVISOR()": FunctionFragment; + "SECONDS_IN_ONE_MINUTE()": FunctionFragment; + "SHIFTER_DELAY()": FunctionFragment; + "SHIFTER_WINDOW()": FunctionFragment; + "_calcSystemBackingRatioFromBAMMValue(uint256)": FunctionFragment; + "accrualAdjustmentMultiplier()": FunctionFragment; + "accrualAdjustmentPeriodCount()": FunctionFragment; + "accrualAdjustmentPeriodSeconds()": FunctionFragment; + "accrualParameter()": FunctionFragment; + "activateMigration()": FunctionFragment; + "bLUSDToken()": FunctionFragment; + "bammSPVault()": FunctionFragment; + "baseRedemptionRate()": FunctionFragment; + "bondNFT()": FunctionFragment; + "calcAccruedBLUSD(uint256)": FunctionFragment; + "calcBondBLUSDCap(uint256)": FunctionFragment; + "calcRedemptionFeePercentage(uint256)": FunctionFragment; + "calcSystemBackingRatio()": FunctionFragment; + "calcTotalLUSDValue()": FunctionFragment; + "calcTotalYearnCurveVaultShareValue()": FunctionFragment; + "calcUpdatedAccrualParameter()": FunctionFragment; + "chickenIn(uint256)": FunctionFragment; + "chickenOut(uint256,uint256)": FunctionFragment; + "countChickenIn()": FunctionFragment; + "countChickenOut()": FunctionFragment; + "createBond(uint256)": FunctionFragment; + "createBondWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "curveBasePool()": FunctionFragment; + "curveDepositLUSD3CRVExchangeRateThreshold()": FunctionFragment; + "curveLiquidityGauge()": FunctionFragment; + "curvePool()": FunctionFragment; + "curveWithdrawal3CRVLUSDExchangeRateThreshold()": FunctionFragment; + "deploymentTimestamp()": FunctionFragment; + "firstChickenInTime()": FunctionFragment; + "getAcquiredLUSDInCurve()": FunctionFragment; + "getAcquiredLUSDInSP()": FunctionFragment; + "getBAMMLUSDDebt()": FunctionFragment; + "getBondData(uint256)": FunctionFragment; + "getLUSDInBAMMSPVault()": FunctionFragment; + "getLUSDToAcquire(uint256)": FunctionFragment; + "getOpenBondCount()": FunctionFragment; + "getOwnedLUSDInCurve()": FunctionFragment; + "getOwnedLUSDInSP()": FunctionFragment; + "getPendingLUSD()": FunctionFragment; + "getPermanentLUSD()": FunctionFragment; + "getTotalAcquiredLUSD()": FunctionFragment; + "getTotalLUSDInCurve()": FunctionFragment; + "getTreasury()": FunctionFragment; + "lastRedemptionTime()": FunctionFragment; + "lastShifterCountdownStartTime()": FunctionFragment; + "lusdToken()": FunctionFragment; + "migration()": FunctionFragment; + "minimumAccrualParameter()": FunctionFragment; + "redeem(uint256,uint256)": FunctionFragment; + "sendFeeShare(uint256)": FunctionFragment; + "shiftLUSDFromCurveToSP(uint256)": FunctionFragment; + "shiftLUSDFromSPToCurve(uint256)": FunctionFragment; + "startShifterCountdown()": FunctionFragment; + "targetAverageAgeSeconds()": FunctionFragment; + "totalWeightedStartTimes()": FunctionFragment; + "yTokensHeldByCBM()": FunctionFragment; + "yearnCurveVault()": FunctionFragment; + "yearnGovernanceAddress()": FunctionFragment; + "yearnRegistry()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "BETA" | "BOOTSTRAP_PERIOD_CHICKEN_IN" | "BOOTSTRAP_PERIOD_REDEEM" | "BOOTSTRAP_PERIOD_SHIFT" | "CHICKEN_IN_AMM_FEE" | "DECIMAL_PRECISION" | "INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL" | "MINUTE_DECAY_FACTOR" | "MIN_BLUSD_SUPPLY" | "MIN_BOND_AMOUNT" | "NFT_RANDOMNESS_DIVISOR" | "SECONDS_IN_ONE_MINUTE" | "SHIFTER_DELAY" | "SHIFTER_WINDOW" | "_calcSystemBackingRatioFromBAMMValue" | "accrualAdjustmentMultiplier" | "accrualAdjustmentPeriodCount" | "accrualAdjustmentPeriodSeconds" | "accrualParameter" | "activateMigration" | "bLUSDToken" | "bammSPVault" | "baseRedemptionRate" | "bondNFT" | "calcAccruedBLUSD" | "calcBondBLUSDCap" | "calcRedemptionFeePercentage" | "calcSystemBackingRatio" | "calcTotalLUSDValue" | "calcTotalYearnCurveVaultShareValue" | "calcUpdatedAccrualParameter" | "chickenIn" | "chickenOut" | "countChickenIn" | "countChickenOut" | "createBond" | "createBondWithPermit" | "curveBasePool" | "curveDepositLUSD3CRVExchangeRateThreshold" | "curveLiquidityGauge" | "curvePool" | "curveWithdrawal3CRVLUSDExchangeRateThreshold" | "deploymentTimestamp" | "firstChickenInTime" | "getAcquiredLUSDInCurve" | "getAcquiredLUSDInSP" | "getBAMMLUSDDebt" | "getBondData" | "getLUSDInBAMMSPVault" | "getLUSDToAcquire" | "getOpenBondCount" | "getOwnedLUSDInCurve" | "getOwnedLUSDInSP" | "getPendingLUSD" | "getPermanentLUSD" | "getTotalAcquiredLUSD" | "getTotalLUSDInCurve" | "getTreasury" | "lastRedemptionTime" | "lastShifterCountdownStartTime" | "lusdToken" | "migration" | "minimumAccrualParameter" | "redeem" | "sendFeeShare" | "shiftLUSDFromCurveToSP" | "shiftLUSDFromSPToCurve" | "startShifterCountdown" | "targetAverageAgeSeconds" | "totalWeightedStartTimes" | "yTokensHeldByCBM" | "yearnCurveVault" | "yearnGovernanceAddress" | "yearnRegistry"): FunctionFragment; + encodeFunctionData(functionFragment: "BETA", values?: undefined): string; + encodeFunctionData(functionFragment: "BOOTSTRAP_PERIOD_CHICKEN_IN", values?: undefined): string; + encodeFunctionData(functionFragment: "BOOTSTRAP_PERIOD_REDEEM", values?: undefined): string; + encodeFunctionData(functionFragment: "BOOTSTRAP_PERIOD_SHIFT", values?: undefined): string; + encodeFunctionData(functionFragment: "CHICKEN_IN_AMM_FEE", values?: undefined): string; + encodeFunctionData(functionFragment: "DECIMAL_PRECISION", values?: undefined): string; + encodeFunctionData(functionFragment: "INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL", values?: undefined): string; + encodeFunctionData(functionFragment: "MINUTE_DECAY_FACTOR", values?: undefined): string; + encodeFunctionData(functionFragment: "MIN_BLUSD_SUPPLY", values?: undefined): string; + encodeFunctionData(functionFragment: "MIN_BOND_AMOUNT", values?: undefined): string; + encodeFunctionData(functionFragment: "NFT_RANDOMNESS_DIVISOR", values?: undefined): string; + encodeFunctionData(functionFragment: "SECONDS_IN_ONE_MINUTE", values?: undefined): string; + encodeFunctionData(functionFragment: "SHIFTER_DELAY", values?: undefined): string; + encodeFunctionData(functionFragment: "SHIFTER_WINDOW", values?: undefined): string; + encodeFunctionData(functionFragment: "_calcSystemBackingRatioFromBAMMValue", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "accrualAdjustmentMultiplier", values?: undefined): string; + encodeFunctionData(functionFragment: "accrualAdjustmentPeriodCount", values?: undefined): string; + encodeFunctionData(functionFragment: "accrualAdjustmentPeriodSeconds", values?: undefined): string; + encodeFunctionData(functionFragment: "accrualParameter", values?: undefined): string; + encodeFunctionData(functionFragment: "activateMigration", values?: undefined): string; + encodeFunctionData(functionFragment: "bLUSDToken", values?: undefined): string; + encodeFunctionData(functionFragment: "bammSPVault", values?: undefined): string; + encodeFunctionData(functionFragment: "baseRedemptionRate", values?: undefined): string; + encodeFunctionData(functionFragment: "bondNFT", values?: undefined): string; + encodeFunctionData(functionFragment: "calcAccruedBLUSD", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "calcBondBLUSDCap", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "calcRedemptionFeePercentage", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "calcSystemBackingRatio", values?: undefined): string; + encodeFunctionData(functionFragment: "calcTotalLUSDValue", values?: undefined): string; + encodeFunctionData(functionFragment: "calcTotalYearnCurveVaultShareValue", values?: undefined): string; + encodeFunctionData(functionFragment: "calcUpdatedAccrualParameter", values?: undefined): string; + encodeFunctionData(functionFragment: "chickenIn", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "chickenOut", values: [BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "countChickenIn", values?: undefined): string; + encodeFunctionData(functionFragment: "countChickenOut", values?: undefined): string; + encodeFunctionData(functionFragment: "createBond", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "createBondWithPermit", values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "curveBasePool", values?: undefined): string; + encodeFunctionData(functionFragment: "curveDepositLUSD3CRVExchangeRateThreshold", values?: undefined): string; + encodeFunctionData(functionFragment: "curveLiquidityGauge", values?: undefined): string; + encodeFunctionData(functionFragment: "curvePool", values?: undefined): string; + encodeFunctionData(functionFragment: "curveWithdrawal3CRVLUSDExchangeRateThreshold", values?: undefined): string; + encodeFunctionData(functionFragment: "deploymentTimestamp", values?: undefined): string; + encodeFunctionData(functionFragment: "firstChickenInTime", values?: undefined): string; + encodeFunctionData(functionFragment: "getAcquiredLUSDInCurve", values?: undefined): string; + encodeFunctionData(functionFragment: "getAcquiredLUSDInSP", values?: undefined): string; + encodeFunctionData(functionFragment: "getBAMMLUSDDebt", values?: undefined): string; + encodeFunctionData(functionFragment: "getBondData", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getLUSDInBAMMSPVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getLUSDToAcquire", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "getOpenBondCount", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwnedLUSDInCurve", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwnedLUSDInSP", values?: undefined): string; + encodeFunctionData(functionFragment: "getPendingLUSD", values?: undefined): string; + encodeFunctionData(functionFragment: "getPermanentLUSD", values?: undefined): string; + encodeFunctionData(functionFragment: "getTotalAcquiredLUSD", values?: undefined): string; + encodeFunctionData(functionFragment: "getTotalLUSDInCurve", values?: undefined): string; + encodeFunctionData(functionFragment: "getTreasury", values?: undefined): string; + encodeFunctionData(functionFragment: "lastRedemptionTime", values?: undefined): string; + encodeFunctionData(functionFragment: "lastShifterCountdownStartTime", values?: undefined): string; + encodeFunctionData(functionFragment: "lusdToken", values?: undefined): string; + encodeFunctionData(functionFragment: "migration", values?: undefined): string; + encodeFunctionData(functionFragment: "minimumAccrualParameter", values?: undefined): string; + encodeFunctionData(functionFragment: "redeem", values: [BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "sendFeeShare", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "shiftLUSDFromCurveToSP", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "shiftLUSDFromSPToCurve", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "startShifterCountdown", values?: undefined): string; + encodeFunctionData(functionFragment: "targetAverageAgeSeconds", values?: undefined): string; + encodeFunctionData(functionFragment: "totalWeightedStartTimes", values?: undefined): string; + encodeFunctionData(functionFragment: "yTokensHeldByCBM", values?: undefined): string; + encodeFunctionData(functionFragment: "yearnCurveVault", values?: undefined): string; + encodeFunctionData(functionFragment: "yearnGovernanceAddress", values?: undefined): string; + encodeFunctionData(functionFragment: "yearnRegistry", values?: undefined): string; + decodeFunctionResult(functionFragment: "BETA", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "BOOTSTRAP_PERIOD_CHICKEN_IN", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "BOOTSTRAP_PERIOD_REDEEM", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "BOOTSTRAP_PERIOD_SHIFT", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "CHICKEN_IN_AMM_FEE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "DECIMAL_PRECISION", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "MINUTE_DECAY_FACTOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "MIN_BLUSD_SUPPLY", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "MIN_BOND_AMOUNT", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "NFT_RANDOMNESS_DIVISOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "SECONDS_IN_ONE_MINUTE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "SHIFTER_DELAY", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "SHIFTER_WINDOW", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_calcSystemBackingRatioFromBAMMValue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accrualAdjustmentMultiplier", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accrualAdjustmentPeriodCount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accrualAdjustmentPeriodSeconds", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accrualParameter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "activateMigration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bLUSDToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bammSPVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseRedemptionRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bondNFT", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcAccruedBLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcBondBLUSDCap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcRedemptionFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcSystemBackingRatio", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcTotalLUSDValue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcTotalYearnCurveVaultShareValue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calcUpdatedAccrualParameter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chickenIn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chickenOut", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "countChickenIn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "countChickenOut", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "createBond", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "createBondWithPermit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveBasePool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveDepositLUSD3CRVExchangeRateThreshold", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveLiquidityGauge", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curvePool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curveWithdrawal3CRVLUSDExchangeRateThreshold", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deploymentTimestamp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "firstChickenInTime", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAcquiredLUSDInCurve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAcquiredLUSDInSP", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBAMMLUSDDebt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBondData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLUSDInBAMMSPVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLUSDToAcquire", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOpenBondCount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwnedLUSDInCurve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwnedLUSDInSP", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPendingLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPermanentLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTotalAcquiredLUSD", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTotalLUSDInCurve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTreasury", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lastRedemptionTime", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lastShifterCountdownStartTime", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lusdToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "migration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "minimumAccrualParameter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendFeeShare", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "shiftLUSDFromCurveToSP", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "shiftLUSDFromSPToCurve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startShifterCountdown", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "targetAverageAgeSeconds", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalWeightedStartTimes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "yTokensHeldByCBM", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "yearnCurveVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "yearnGovernanceAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "yearnRegistry", data: BytesLike): Result; + events: { + "AccrualParameterUpdated(uint256)": EventFragment; + "BLUSDRedeemed(address,uint256,uint256,uint256,uint256,uint256)": EventFragment; + "BaseRedemptionRateUpdated(uint256)": EventFragment; + "BondCancelled(address,uint256,uint256,uint256,uint256,uint80)": EventFragment; + "BondClaimed(address,uint256,uint256,uint256,uint256,uint256,bool,uint80)": EventFragment; + "BondCreated(address,uint256,uint256,uint80)": EventFragment; + "LastRedemptionTimeUpdated(uint256)": EventFragment; + "MigrationTriggered(uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AccrualParameterUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BLUSDRedeemed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BaseRedemptionRateUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BondCancelled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BondClaimed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BondCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LastRedemptionTimeUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MigrationTriggered"): EventFragment; +} +export interface AccrualParameterUpdatedEventObject { + accrualParameter: BigNumber; +} +export declare type AccrualParameterUpdatedEvent = TypedEvent<[ + BigNumber +], AccrualParameterUpdatedEventObject>; +export declare type AccrualParameterUpdatedEventFilter = TypedEventFilter; +export interface BLUSDRedeemedEventObject { + redeemer: string; + bLusdAmount: BigNumber; + minLusdAmount: BigNumber; + lusdAmount: BigNumber; + yTokens: BigNumber; + redemptionFee: BigNumber; +} +export declare type BLUSDRedeemedEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], BLUSDRedeemedEventObject>; +export declare type BLUSDRedeemedEventFilter = TypedEventFilter; +export interface BaseRedemptionRateUpdatedEventObject { + _baseRedemptionRate: BigNumber; +} +export declare type BaseRedemptionRateUpdatedEvent = TypedEvent<[ + BigNumber +], BaseRedemptionRateUpdatedEventObject>; +export declare type BaseRedemptionRateUpdatedEventFilter = TypedEventFilter; +export interface BondCancelledEventObject { + bonder: string; + bondId: BigNumber; + principalLusdAmount: BigNumber; + minLusdAmount: BigNumber; + withdrawnLusdAmount: BigNumber; + bondFinalHalfDna: BigNumber; +} +export declare type BondCancelledEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], BondCancelledEventObject>; +export declare type BondCancelledEventFilter = TypedEventFilter; +export interface BondClaimedEventObject { + bonder: string; + bondId: BigNumber; + lusdAmount: BigNumber; + bLusdAmount: BigNumber; + lusdSurplus: BigNumber; + chickenInFeeAmount: BigNumber; + migration: boolean; + bondFinalHalfDna: BigNumber; +} +export declare type BondClaimedEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + BigNumber +], BondClaimedEventObject>; +export declare type BondClaimedEventFilter = TypedEventFilter; +export interface BondCreatedEventObject { + bonder: string; + bondId: BigNumber; + amount: BigNumber; + bondInitialHalfDna: BigNumber; +} +export declare type BondCreatedEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber +], BondCreatedEventObject>; +export declare type BondCreatedEventFilter = TypedEventFilter; +export interface LastRedemptionTimeUpdatedEventObject { + _lastRedemptionFeeOpTime: BigNumber; +} +export declare type LastRedemptionTimeUpdatedEvent = TypedEvent<[ + BigNumber +], LastRedemptionTimeUpdatedEventObject>; +export declare type LastRedemptionTimeUpdatedEventFilter = TypedEventFilter; +export interface MigrationTriggeredEventObject { + previousPermanentLUSD: BigNumber; +} +export declare type MigrationTriggeredEvent = TypedEvent<[ + BigNumber +], MigrationTriggeredEventObject>; +export declare type MigrationTriggeredEventFilter = TypedEventFilter; +export interface ChickenBondManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ChickenBondManagerInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + BETA(overrides?: CallOverrides): Promise<[BigNumber]>; + BOOTSTRAP_PERIOD_CHICKEN_IN(overrides?: CallOverrides): Promise<[BigNumber]>; + BOOTSTRAP_PERIOD_REDEEM(overrides?: CallOverrides): Promise<[BigNumber]>; + BOOTSTRAP_PERIOD_SHIFT(overrides?: CallOverrides): Promise<[BigNumber]>; + CHICKEN_IN_AMM_FEE(overrides?: CallOverrides): Promise<[BigNumber]>; + DECIMAL_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL(overrides?: CallOverrides): Promise<[BigNumber]>; + MINUTE_DECAY_FACTOR(overrides?: CallOverrides): Promise<[BigNumber]>; + MIN_BLUSD_SUPPLY(overrides?: CallOverrides): Promise<[BigNumber]>; + MIN_BOND_AMOUNT(overrides?: CallOverrides): Promise<[BigNumber]>; + NFT_RANDOMNESS_DIVISOR(overrides?: CallOverrides): Promise<[BigNumber]>; + SECONDS_IN_ONE_MINUTE(overrides?: CallOverrides): Promise<[BigNumber]>; + SHIFTER_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + SHIFTER_WINDOW(overrides?: CallOverrides): Promise<[BigNumber]>; + _calcSystemBackingRatioFromBAMMValue(_bammLUSDValue: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + accrualAdjustmentMultiplier(overrides?: CallOverrides): Promise<[BigNumber]>; + accrualAdjustmentPeriodCount(overrides?: CallOverrides): Promise<[BigNumber]>; + accrualAdjustmentPeriodSeconds(overrides?: CallOverrides): Promise<[BigNumber]>; + accrualParameter(overrides?: CallOverrides): Promise<[BigNumber]>; + activateMigration(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDToken(overrides?: CallOverrides): Promise<[string]>; + bammSPVault(overrides?: CallOverrides): Promise<[string]>; + baseRedemptionRate(overrides?: CallOverrides): Promise<[BigNumber]>; + bondNFT(overrides?: CallOverrides): Promise<[string]>; + calcAccruedBLUSD(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + calcBondBLUSDCap(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + calcRedemptionFeePercentage(_fractionOfBLUSDToRedeem: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + calcSystemBackingRatio(overrides?: CallOverrides): Promise<[BigNumber]>; + calcTotalLUSDValue(overrides?: CallOverrides): Promise<[BigNumber]>; + calcTotalYearnCurveVaultShareValue(overrides?: CallOverrides): Promise<[BigNumber]>; + calcUpdatedAccrualParameter(overrides?: CallOverrides): Promise<[BigNumber]>; + chickenIn(_bondID: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenOut(_bondID: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + countChickenIn(overrides?: CallOverrides): Promise<[BigNumber]>; + countChickenOut(overrides?: CallOverrides): Promise<[BigNumber]>; + createBond(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + createBondWithPermit(owner: string, amount: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + curveBasePool(overrides?: CallOverrides): Promise<[string]>; + curveDepositLUSD3CRVExchangeRateThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + curveLiquidityGauge(overrides?: CallOverrides): Promise<[string]>; + curvePool(overrides?: CallOverrides): Promise<[string]>; + curveWithdrawal3CRVLUSDExchangeRateThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + deploymentTimestamp(overrides?: CallOverrides): Promise<[BigNumber]>; + firstChickenInTime(overrides?: CallOverrides): Promise<[BigNumber]>; + getAcquiredLUSDInCurve(overrides?: CallOverrides): Promise<[BigNumber]>; + getAcquiredLUSDInSP(overrides?: CallOverrides): Promise<[BigNumber]>; + getBAMMLUSDDebt(overrides?: CallOverrides): Promise<[BigNumber]>; + getBondData(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + number + ] & { + lusdAmount: BigNumber; + claimedBLUSD: BigNumber; + startTime: BigNumber; + endTime: BigNumber; + status: number; + }>; + getLUSDInBAMMSPVault(overrides?: CallOverrides): Promise<[BigNumber]>; + getLUSDToAcquire(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + getOpenBondCount(overrides?: CallOverrides): Promise<[BigNumber] & { + openBondCount: BigNumber; + }>; + getOwnedLUSDInCurve(overrides?: CallOverrides): Promise<[BigNumber]>; + getOwnedLUSDInSP(overrides?: CallOverrides): Promise<[BigNumber]>; + getPendingLUSD(overrides?: CallOverrides): Promise<[BigNumber]>; + getPermanentLUSD(overrides?: CallOverrides): Promise<[BigNumber]>; + getTotalAcquiredLUSD(overrides?: CallOverrides): Promise<[BigNumber]>; + getTotalLUSDInCurve(overrides?: CallOverrides): Promise<[BigNumber]>; + getTreasury(overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + _pendingLUSD: BigNumber; + _totalAcquiredLUSD: BigNumber; + _permanentLUSD: BigNumber; + }>; + lastRedemptionTime(overrides?: CallOverrides): Promise<[BigNumber]>; + lastShifterCountdownStartTime(overrides?: CallOverrides): Promise<[BigNumber]>; + lusdToken(overrides?: CallOverrides): Promise<[string]>; + migration(overrides?: CallOverrides): Promise<[boolean]>; + minimumAccrualParameter(overrides?: CallOverrides): Promise<[BigNumber]>; + redeem(_bLUSDToRedeem: BigNumberish, _minLUSDFromBAMMSPVault: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendFeeShare(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromCurveToSP(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromSPToCurve(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + startShifterCountdown(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + targetAverageAgeSeconds(overrides?: CallOverrides): Promise<[BigNumber]>; + totalWeightedStartTimes(overrides?: CallOverrides): Promise<[BigNumber]>; + yTokensHeldByCBM(overrides?: CallOverrides): Promise<[BigNumber]>; + yearnCurveVault(overrides?: CallOverrides): Promise<[string]>; + yearnGovernanceAddress(overrides?: CallOverrides): Promise<[string]>; + yearnRegistry(overrides?: CallOverrides): Promise<[string]>; + }; + BETA(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_CHICKEN_IN(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_REDEEM(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_SHIFT(overrides?: CallOverrides): Promise; + CHICKEN_IN_AMM_FEE(overrides?: CallOverrides): Promise; + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL(overrides?: CallOverrides): Promise; + MINUTE_DECAY_FACTOR(overrides?: CallOverrides): Promise; + MIN_BLUSD_SUPPLY(overrides?: CallOverrides): Promise; + MIN_BOND_AMOUNT(overrides?: CallOverrides): Promise; + NFT_RANDOMNESS_DIVISOR(overrides?: CallOverrides): Promise; + SECONDS_IN_ONE_MINUTE(overrides?: CallOverrides): Promise; + SHIFTER_DELAY(overrides?: CallOverrides): Promise; + SHIFTER_WINDOW(overrides?: CallOverrides): Promise; + _calcSystemBackingRatioFromBAMMValue(_bammLUSDValue: BigNumberish, overrides?: CallOverrides): Promise; + accrualAdjustmentMultiplier(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodCount(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodSeconds(overrides?: CallOverrides): Promise; + accrualParameter(overrides?: CallOverrides): Promise; + activateMigration(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + bammSPVault(overrides?: CallOverrides): Promise; + baseRedemptionRate(overrides?: CallOverrides): Promise; + bondNFT(overrides?: CallOverrides): Promise; + calcAccruedBLUSD(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcBondBLUSDCap(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcRedemptionFeePercentage(_fractionOfBLUSDToRedeem: BigNumberish, overrides?: CallOverrides): Promise; + calcSystemBackingRatio(overrides?: CallOverrides): Promise; + calcTotalLUSDValue(overrides?: CallOverrides): Promise; + calcTotalYearnCurveVaultShareValue(overrides?: CallOverrides): Promise; + calcUpdatedAccrualParameter(overrides?: CallOverrides): Promise; + chickenIn(_bondID: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenOut(_bondID: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + countChickenIn(overrides?: CallOverrides): Promise; + countChickenOut(overrides?: CallOverrides): Promise; + createBond(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + createBondWithPermit(owner: string, amount: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + curveBasePool(overrides?: CallOverrides): Promise; + curveDepositLUSD3CRVExchangeRateThreshold(overrides?: CallOverrides): Promise; + curveLiquidityGauge(overrides?: CallOverrides): Promise; + curvePool(overrides?: CallOverrides): Promise; + curveWithdrawal3CRVLUSDExchangeRateThreshold(overrides?: CallOverrides): Promise; + deploymentTimestamp(overrides?: CallOverrides): Promise; + firstChickenInTime(overrides?: CallOverrides): Promise; + getAcquiredLUSDInCurve(overrides?: CallOverrides): Promise; + getAcquiredLUSDInSP(overrides?: CallOverrides): Promise; + getBAMMLUSDDebt(overrides?: CallOverrides): Promise; + getBondData(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + number + ] & { + lusdAmount: BigNumber; + claimedBLUSD: BigNumber; + startTime: BigNumber; + endTime: BigNumber; + status: number; + }>; + getLUSDInBAMMSPVault(overrides?: CallOverrides): Promise; + getLUSDToAcquire(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getOpenBondCount(overrides?: CallOverrides): Promise; + getOwnedLUSDInCurve(overrides?: CallOverrides): Promise; + getOwnedLUSDInSP(overrides?: CallOverrides): Promise; + getPendingLUSD(overrides?: CallOverrides): Promise; + getPermanentLUSD(overrides?: CallOverrides): Promise; + getTotalAcquiredLUSD(overrides?: CallOverrides): Promise; + getTotalLUSDInCurve(overrides?: CallOverrides): Promise; + getTreasury(overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + _pendingLUSD: BigNumber; + _totalAcquiredLUSD: BigNumber; + _permanentLUSD: BigNumber; + }>; + lastRedemptionTime(overrides?: CallOverrides): Promise; + lastShifterCountdownStartTime(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + migration(overrides?: CallOverrides): Promise; + minimumAccrualParameter(overrides?: CallOverrides): Promise; + redeem(_bLUSDToRedeem: BigNumberish, _minLUSDFromBAMMSPVault: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendFeeShare(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromCurveToSP(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromSPToCurve(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + startShifterCountdown(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + targetAverageAgeSeconds(overrides?: CallOverrides): Promise; + totalWeightedStartTimes(overrides?: CallOverrides): Promise; + yTokensHeldByCBM(overrides?: CallOverrides): Promise; + yearnCurveVault(overrides?: CallOverrides): Promise; + yearnGovernanceAddress(overrides?: CallOverrides): Promise; + yearnRegistry(overrides?: CallOverrides): Promise; + callStatic: { + BETA(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_CHICKEN_IN(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_REDEEM(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_SHIFT(overrides?: CallOverrides): Promise; + CHICKEN_IN_AMM_FEE(overrides?: CallOverrides): Promise; + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL(overrides?: CallOverrides): Promise; + MINUTE_DECAY_FACTOR(overrides?: CallOverrides): Promise; + MIN_BLUSD_SUPPLY(overrides?: CallOverrides): Promise; + MIN_BOND_AMOUNT(overrides?: CallOverrides): Promise; + NFT_RANDOMNESS_DIVISOR(overrides?: CallOverrides): Promise; + SECONDS_IN_ONE_MINUTE(overrides?: CallOverrides): Promise; + SHIFTER_DELAY(overrides?: CallOverrides): Promise; + SHIFTER_WINDOW(overrides?: CallOverrides): Promise; + _calcSystemBackingRatioFromBAMMValue(_bammLUSDValue: BigNumberish, overrides?: CallOverrides): Promise; + accrualAdjustmentMultiplier(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodCount(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodSeconds(overrides?: CallOverrides): Promise; + accrualParameter(overrides?: CallOverrides): Promise; + activateMigration(overrides?: CallOverrides): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + bammSPVault(overrides?: CallOverrides): Promise; + baseRedemptionRate(overrides?: CallOverrides): Promise; + bondNFT(overrides?: CallOverrides): Promise; + calcAccruedBLUSD(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcBondBLUSDCap(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcRedemptionFeePercentage(_fractionOfBLUSDToRedeem: BigNumberish, overrides?: CallOverrides): Promise; + calcSystemBackingRatio(overrides?: CallOverrides): Promise; + calcTotalLUSDValue(overrides?: CallOverrides): Promise; + calcTotalYearnCurveVaultShareValue(overrides?: CallOverrides): Promise; + calcUpdatedAccrualParameter(overrides?: CallOverrides): Promise; + chickenIn(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + chickenOut(_bondID: BigNumberish, _minLUSD: BigNumberish, overrides?: CallOverrides): Promise; + countChickenIn(overrides?: CallOverrides): Promise; + countChickenOut(overrides?: CallOverrides): Promise; + createBond(_lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + createBondWithPermit(owner: string, amount: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: CallOverrides): Promise; + curveBasePool(overrides?: CallOverrides): Promise; + curveDepositLUSD3CRVExchangeRateThreshold(overrides?: CallOverrides): Promise; + curveLiquidityGauge(overrides?: CallOverrides): Promise; + curvePool(overrides?: CallOverrides): Promise; + curveWithdrawal3CRVLUSDExchangeRateThreshold(overrides?: CallOverrides): Promise; + deploymentTimestamp(overrides?: CallOverrides): Promise; + firstChickenInTime(overrides?: CallOverrides): Promise; + getAcquiredLUSDInCurve(overrides?: CallOverrides): Promise; + getAcquiredLUSDInSP(overrides?: CallOverrides): Promise; + getBAMMLUSDDebt(overrides?: CallOverrides): Promise; + getBondData(_bondID: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + number + ] & { + lusdAmount: BigNumber; + claimedBLUSD: BigNumber; + startTime: BigNumber; + endTime: BigNumber; + status: number; + }>; + getLUSDInBAMMSPVault(overrides?: CallOverrides): Promise; + getLUSDToAcquire(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getOpenBondCount(overrides?: CallOverrides): Promise; + getOwnedLUSDInCurve(overrides?: CallOverrides): Promise; + getOwnedLUSDInSP(overrides?: CallOverrides): Promise; + getPendingLUSD(overrides?: CallOverrides): Promise; + getPermanentLUSD(overrides?: CallOverrides): Promise; + getTotalAcquiredLUSD(overrides?: CallOverrides): Promise; + getTotalLUSDInCurve(overrides?: CallOverrides): Promise; + getTreasury(overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + _pendingLUSD: BigNumber; + _totalAcquiredLUSD: BigNumber; + _permanentLUSD: BigNumber; + }>; + lastRedemptionTime(overrides?: CallOverrides): Promise; + lastShifterCountdownStartTime(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + migration(overrides?: CallOverrides): Promise; + minimumAccrualParameter(overrides?: CallOverrides): Promise; + redeem(_bLUSDToRedeem: BigNumberish, _minLUSDFromBAMMSPVault: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber, BigNumber]>; + sendFeeShare(_lusdAmount: BigNumberish, overrides?: CallOverrides): Promise; + shiftLUSDFromCurveToSP(_maxLUSDToShift: BigNumberish, overrides?: CallOverrides): Promise; + shiftLUSDFromSPToCurve(_maxLUSDToShift: BigNumberish, overrides?: CallOverrides): Promise; + startShifterCountdown(overrides?: CallOverrides): Promise; + targetAverageAgeSeconds(overrides?: CallOverrides): Promise; + totalWeightedStartTimes(overrides?: CallOverrides): Promise; + yTokensHeldByCBM(overrides?: CallOverrides): Promise; + yearnCurveVault(overrides?: CallOverrides): Promise; + yearnGovernanceAddress(overrides?: CallOverrides): Promise; + yearnRegistry(overrides?: CallOverrides): Promise; + }; + filters: { + "AccrualParameterUpdated(uint256)"(accrualParameter?: null): AccrualParameterUpdatedEventFilter; + AccrualParameterUpdated(accrualParameter?: null): AccrualParameterUpdatedEventFilter; + "BLUSDRedeemed(address,uint256,uint256,uint256,uint256,uint256)"(redeemer?: string | null, bLusdAmount?: null, minLusdAmount?: null, lusdAmount?: null, yTokens?: null, redemptionFee?: null): BLUSDRedeemedEventFilter; + BLUSDRedeemed(redeemer?: string | null, bLusdAmount?: null, minLusdAmount?: null, lusdAmount?: null, yTokens?: null, redemptionFee?: null): BLUSDRedeemedEventFilter; + "BaseRedemptionRateUpdated(uint256)"(_baseRedemptionRate?: null): BaseRedemptionRateUpdatedEventFilter; + BaseRedemptionRateUpdated(_baseRedemptionRate?: null): BaseRedemptionRateUpdatedEventFilter; + "BondCancelled(address,uint256,uint256,uint256,uint256,uint80)"(bonder?: string | null, bondId?: null, principalLusdAmount?: null, minLusdAmount?: null, withdrawnLusdAmount?: null, bondFinalHalfDna?: null): BondCancelledEventFilter; + BondCancelled(bonder?: string | null, bondId?: null, principalLusdAmount?: null, minLusdAmount?: null, withdrawnLusdAmount?: null, bondFinalHalfDna?: null): BondCancelledEventFilter; + "BondClaimed(address,uint256,uint256,uint256,uint256,uint256,bool,uint80)"(bonder?: string | null, bondId?: null, lusdAmount?: null, bLusdAmount?: null, lusdSurplus?: null, chickenInFeeAmount?: null, migration?: null, bondFinalHalfDna?: null): BondClaimedEventFilter; + BondClaimed(bonder?: string | null, bondId?: null, lusdAmount?: null, bLusdAmount?: null, lusdSurplus?: null, chickenInFeeAmount?: null, migration?: null, bondFinalHalfDna?: null): BondClaimedEventFilter; + "BondCreated(address,uint256,uint256,uint80)"(bonder?: string | null, bondId?: null, amount?: null, bondInitialHalfDna?: null): BondCreatedEventFilter; + BondCreated(bonder?: string | null, bondId?: null, amount?: null, bondInitialHalfDna?: null): BondCreatedEventFilter; + "LastRedemptionTimeUpdated(uint256)"(_lastRedemptionFeeOpTime?: null): LastRedemptionTimeUpdatedEventFilter; + LastRedemptionTimeUpdated(_lastRedemptionFeeOpTime?: null): LastRedemptionTimeUpdatedEventFilter; + "MigrationTriggered(uint256)"(previousPermanentLUSD?: null): MigrationTriggeredEventFilter; + MigrationTriggered(previousPermanentLUSD?: null): MigrationTriggeredEventFilter; + }; + estimateGas: { + BETA(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_CHICKEN_IN(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_REDEEM(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_SHIFT(overrides?: CallOverrides): Promise; + CHICKEN_IN_AMM_FEE(overrides?: CallOverrides): Promise; + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL(overrides?: CallOverrides): Promise; + MINUTE_DECAY_FACTOR(overrides?: CallOverrides): Promise; + MIN_BLUSD_SUPPLY(overrides?: CallOverrides): Promise; + MIN_BOND_AMOUNT(overrides?: CallOverrides): Promise; + NFT_RANDOMNESS_DIVISOR(overrides?: CallOverrides): Promise; + SECONDS_IN_ONE_MINUTE(overrides?: CallOverrides): Promise; + SHIFTER_DELAY(overrides?: CallOverrides): Promise; + SHIFTER_WINDOW(overrides?: CallOverrides): Promise; + _calcSystemBackingRatioFromBAMMValue(_bammLUSDValue: BigNumberish, overrides?: CallOverrides): Promise; + accrualAdjustmentMultiplier(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodCount(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodSeconds(overrides?: CallOverrides): Promise; + accrualParameter(overrides?: CallOverrides): Promise; + activateMigration(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + bammSPVault(overrides?: CallOverrides): Promise; + baseRedemptionRate(overrides?: CallOverrides): Promise; + bondNFT(overrides?: CallOverrides): Promise; + calcAccruedBLUSD(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcBondBLUSDCap(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcRedemptionFeePercentage(_fractionOfBLUSDToRedeem: BigNumberish, overrides?: CallOverrides): Promise; + calcSystemBackingRatio(overrides?: CallOverrides): Promise; + calcTotalLUSDValue(overrides?: CallOverrides): Promise; + calcTotalYearnCurveVaultShareValue(overrides?: CallOverrides): Promise; + calcUpdatedAccrualParameter(overrides?: CallOverrides): Promise; + chickenIn(_bondID: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenOut(_bondID: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + countChickenIn(overrides?: CallOverrides): Promise; + countChickenOut(overrides?: CallOverrides): Promise; + createBond(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + createBondWithPermit(owner: string, amount: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + curveBasePool(overrides?: CallOverrides): Promise; + curveDepositLUSD3CRVExchangeRateThreshold(overrides?: CallOverrides): Promise; + curveLiquidityGauge(overrides?: CallOverrides): Promise; + curvePool(overrides?: CallOverrides): Promise; + curveWithdrawal3CRVLUSDExchangeRateThreshold(overrides?: CallOverrides): Promise; + deploymentTimestamp(overrides?: CallOverrides): Promise; + firstChickenInTime(overrides?: CallOverrides): Promise; + getAcquiredLUSDInCurve(overrides?: CallOverrides): Promise; + getAcquiredLUSDInSP(overrides?: CallOverrides): Promise; + getBAMMLUSDDebt(overrides?: CallOverrides): Promise; + getBondData(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getLUSDInBAMMSPVault(overrides?: CallOverrides): Promise; + getLUSDToAcquire(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getOpenBondCount(overrides?: CallOverrides): Promise; + getOwnedLUSDInCurve(overrides?: CallOverrides): Promise; + getOwnedLUSDInSP(overrides?: CallOverrides): Promise; + getPendingLUSD(overrides?: CallOverrides): Promise; + getPermanentLUSD(overrides?: CallOverrides): Promise; + getTotalAcquiredLUSD(overrides?: CallOverrides): Promise; + getTotalLUSDInCurve(overrides?: CallOverrides): Promise; + getTreasury(overrides?: CallOverrides): Promise; + lastRedemptionTime(overrides?: CallOverrides): Promise; + lastShifterCountdownStartTime(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + migration(overrides?: CallOverrides): Promise; + minimumAccrualParameter(overrides?: CallOverrides): Promise; + redeem(_bLUSDToRedeem: BigNumberish, _minLUSDFromBAMMSPVault: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendFeeShare(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromCurveToSP(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromSPToCurve(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + startShifterCountdown(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + targetAverageAgeSeconds(overrides?: CallOverrides): Promise; + totalWeightedStartTimes(overrides?: CallOverrides): Promise; + yTokensHeldByCBM(overrides?: CallOverrides): Promise; + yearnCurveVault(overrides?: CallOverrides): Promise; + yearnGovernanceAddress(overrides?: CallOverrides): Promise; + yearnRegistry(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + BETA(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_CHICKEN_IN(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_REDEEM(overrides?: CallOverrides): Promise; + BOOTSTRAP_PERIOD_SHIFT(overrides?: CallOverrides): Promise; + CHICKEN_IN_AMM_FEE(overrides?: CallOverrides): Promise; + DECIMAL_PRECISION(overrides?: CallOverrides): Promise; + INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL(overrides?: CallOverrides): Promise; + MINUTE_DECAY_FACTOR(overrides?: CallOverrides): Promise; + MIN_BLUSD_SUPPLY(overrides?: CallOverrides): Promise; + MIN_BOND_AMOUNT(overrides?: CallOverrides): Promise; + NFT_RANDOMNESS_DIVISOR(overrides?: CallOverrides): Promise; + SECONDS_IN_ONE_MINUTE(overrides?: CallOverrides): Promise; + SHIFTER_DELAY(overrides?: CallOverrides): Promise; + SHIFTER_WINDOW(overrides?: CallOverrides): Promise; + _calcSystemBackingRatioFromBAMMValue(_bammLUSDValue: BigNumberish, overrides?: CallOverrides): Promise; + accrualAdjustmentMultiplier(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodCount(overrides?: CallOverrides): Promise; + accrualAdjustmentPeriodSeconds(overrides?: CallOverrides): Promise; + accrualParameter(overrides?: CallOverrides): Promise; + activateMigration(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + bLUSDToken(overrides?: CallOverrides): Promise; + bammSPVault(overrides?: CallOverrides): Promise; + baseRedemptionRate(overrides?: CallOverrides): Promise; + bondNFT(overrides?: CallOverrides): Promise; + calcAccruedBLUSD(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcBondBLUSDCap(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + calcRedemptionFeePercentage(_fractionOfBLUSDToRedeem: BigNumberish, overrides?: CallOverrides): Promise; + calcSystemBackingRatio(overrides?: CallOverrides): Promise; + calcTotalLUSDValue(overrides?: CallOverrides): Promise; + calcTotalYearnCurveVaultShareValue(overrides?: CallOverrides): Promise; + calcUpdatedAccrualParameter(overrides?: CallOverrides): Promise; + chickenIn(_bondID: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + chickenOut(_bondID: BigNumberish, _minLUSD: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + countChickenIn(overrides?: CallOverrides): Promise; + countChickenOut(overrides?: CallOverrides): Promise; + createBond(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + createBondWithPermit(owner: string, amount: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + curveBasePool(overrides?: CallOverrides): Promise; + curveDepositLUSD3CRVExchangeRateThreshold(overrides?: CallOverrides): Promise; + curveLiquidityGauge(overrides?: CallOverrides): Promise; + curvePool(overrides?: CallOverrides): Promise; + curveWithdrawal3CRVLUSDExchangeRateThreshold(overrides?: CallOverrides): Promise; + deploymentTimestamp(overrides?: CallOverrides): Promise; + firstChickenInTime(overrides?: CallOverrides): Promise; + getAcquiredLUSDInCurve(overrides?: CallOverrides): Promise; + getAcquiredLUSDInSP(overrides?: CallOverrides): Promise; + getBAMMLUSDDebt(overrides?: CallOverrides): Promise; + getBondData(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getLUSDInBAMMSPVault(overrides?: CallOverrides): Promise; + getLUSDToAcquire(_bondID: BigNumberish, overrides?: CallOverrides): Promise; + getOpenBondCount(overrides?: CallOverrides): Promise; + getOwnedLUSDInCurve(overrides?: CallOverrides): Promise; + getOwnedLUSDInSP(overrides?: CallOverrides): Promise; + getPendingLUSD(overrides?: CallOverrides): Promise; + getPermanentLUSD(overrides?: CallOverrides): Promise; + getTotalAcquiredLUSD(overrides?: CallOverrides): Promise; + getTotalLUSDInCurve(overrides?: CallOverrides): Promise; + getTreasury(overrides?: CallOverrides): Promise; + lastRedemptionTime(overrides?: CallOverrides): Promise; + lastShifterCountdownStartTime(overrides?: CallOverrides): Promise; + lusdToken(overrides?: CallOverrides): Promise; + migration(overrides?: CallOverrides): Promise; + minimumAccrualParameter(overrides?: CallOverrides): Promise; + redeem(_bLUSDToRedeem: BigNumberish, _minLUSDFromBAMMSPVault: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendFeeShare(_lusdAmount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromCurveToSP(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + shiftLUSDFromSPToCurve(_maxLUSDToShift: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + startShifterCountdown(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + targetAverageAgeSeconds(overrides?: CallOverrides): Promise; + totalWeightedStartTimes(overrides?: CallOverrides): Promise; + yTokensHeldByCBM(overrides?: CallOverrides): Promise; + yearnCurveVault(overrides?: CallOverrides): Promise; + yearnGovernanceAddress(overrides?: CallOverrides): Promise; + yearnRegistry(overrides?: CallOverrides): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ChickenBondManager.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.d.ts new file mode 100644 index 0000000..d13266e --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.d.ts @@ -0,0 +1,343 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ERC20FaucetInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "lastTapped(address)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "owner()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "symbol()": FunctionFragment; + "tap()": FunctionFragment; + "tapAmount()": FunctionFragment; + "tapPeriod()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "increaseAllowance" | "lastTapped" | "mint" | "name" | "nonces" | "owner" | "permit" | "renounceOwnership" | "symbol" | "tap" | "tapAmount" | "tapPeriod" | "totalSupply" | "transfer" | "transferFrom" | "transferOwnership"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "lastTapped", values: [string]): string; + encodeFunctionData(functionFragment: "mint", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "tap", values?: undefined): string; + encodeFunctionData(functionFragment: "tapAmount", values?: undefined): string; + encodeFunctionData(functionFragment: "tapPeriod", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [string]): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lastTapped", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tapAmount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tapPeriod", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], ApprovalEventObject>; +export declare type ApprovalEventFilter = TypedEventFilter; +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export declare type OwnershipTransferredEvent = TypedEvent<[ + string, + string +], OwnershipTransferredEventObject>; +export declare type OwnershipTransferredEventFilter = TypedEventFilter; +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], TransferEventObject>; +export declare type TransferEventFilter = TypedEventFilter; +export interface ERC20Faucet extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ERC20FaucetInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lastTapped(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + mint(_to: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + owner(overrides?: CallOverrides): Promise<[string]>; + permit(owner: string, spender: string, value: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + tap(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + tapAmount(overrides?: CallOverrides): Promise<[BigNumber]>; + tapPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lastTapped(arg0: string, overrides?: CallOverrides): Promise; + mint(_to: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + permit(owner: string, spender: string, value: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + tap(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + tapAmount(overrides?: CallOverrides): Promise; + tapPeriod(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: CallOverrides): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: CallOverrides): Promise; + lastTapped(arg0: string, overrides?: CallOverrides): Promise; + mint(_to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + permit(owner: string, spender: string, value: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + tap(overrides?: CallOverrides): Promise; + tapAmount(overrides?: CallOverrides): Promise; + tapPeriod(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + transferOwnership(newOwner: string, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + "OwnershipTransferred(address,address)"(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lastTapped(arg0: string, overrides?: CallOverrides): Promise; + mint(_to: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + permit(owner: string, spender: string, value: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + tap(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + tapAmount(overrides?: CallOverrides): Promise; + tapPeriod(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lastTapped(arg0: string, overrides?: CallOverrides): Promise; + mint(_to: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + permit(owner: string, spender: string, value: BigNumberish, deadline: BigNumberish, v: BigNumberish, r: BytesLike, s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + renounceOwnership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + tap(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + tapAmount(overrides?: CallOverrides): Promise; + tapPeriod(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferOwnership(newOwner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/ERC20Faucet.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.d.ts new file mode 100644 index 0000000..0bbb0e0 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.d.ts @@ -0,0 +1,21 @@ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; +export interface TypedEvent = any, TArgsObject = any> extends Event { + args: TArgsArray & TArgsObject; +} +export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { +} +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} +declare type __TypechainArgsArray = T extends TypedEvent ? U : never; +export interface OnEvent { + (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + (eventName: string, listener: Listener): TRes; +} +export declare type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; +export declare type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; +export declare type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/common.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.d.ts new file mode 100644 index 0000000..8e1af61 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.d.ts @@ -0,0 +1,1031 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface CurveCryptoSwap2ETHInterface extends utils.Interface { + functions: { + "token()": FunctionFragment; + "coins(uint256)": FunctionFragment; + "A()": FunctionFragment; + "gamma()": FunctionFragment; + "fee()": FunctionFragment; + "get_virtual_price()": FunctionFragment; + "price_oracle()": FunctionFragment; + "exchange(uint256,uint256,uint256,uint256)": FunctionFragment; + "exchange(uint256,uint256,uint256,uint256,bool)": FunctionFragment; + "exchange(uint256,uint256,uint256,uint256,bool,address)": FunctionFragment; + "exchange_underlying(uint256,uint256,uint256,uint256)": FunctionFragment; + "exchange_underlying(uint256,uint256,uint256,uint256,address)": FunctionFragment; + "exchange_extended(uint256,uint256,uint256,uint256,bool,address,address,bytes)": FunctionFragment; + "get_dy(uint256,uint256,uint256)": FunctionFragment; + "add_liquidity(uint256[2],uint256)": FunctionFragment; + "add_liquidity(uint256[2],uint256,bool)": FunctionFragment; + "add_liquidity(uint256[2],uint256,bool,address)": FunctionFragment; + "remove_liquidity(uint256,uint256[2])": FunctionFragment; + "remove_liquidity(uint256,uint256[2],bool)": FunctionFragment; + "remove_liquidity(uint256,uint256[2],bool,address)": FunctionFragment; + "calc_token_amount(uint256[2])": FunctionFragment; + "calc_withdraw_one_coin(uint256,uint256)": FunctionFragment; + "remove_liquidity_one_coin(uint256,uint256,uint256)": FunctionFragment; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)": FunctionFragment; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)": FunctionFragment; + "claim_admin_fees()": FunctionFragment; + "ramp_A_gamma(uint256,uint256,uint256)": FunctionFragment; + "stop_ramp_A_gamma()": FunctionFragment; + "commit_new_parameters(uint256,uint256,uint256,uint256,uint256,uint256,uint256)": FunctionFragment; + "apply_new_parameters()": FunctionFragment; + "revert_new_parameters()": FunctionFragment; + "commit_transfer_ownership(address)": FunctionFragment; + "apply_transfer_ownership()": FunctionFragment; + "revert_transfer_ownership()": FunctionFragment; + "kill_me()": FunctionFragment; + "unkill_me()": FunctionFragment; + "set_admin_fee_receiver(address)": FunctionFragment; + "lp_price()": FunctionFragment; + "price_scale()": FunctionFragment; + "last_prices()": FunctionFragment; + "last_prices_timestamp()": FunctionFragment; + "initial_A_gamma()": FunctionFragment; + "future_A_gamma()": FunctionFragment; + "initial_A_gamma_time()": FunctionFragment; + "future_A_gamma_time()": FunctionFragment; + "allowed_extra_profit()": FunctionFragment; + "future_allowed_extra_profit()": FunctionFragment; + "fee_gamma()": FunctionFragment; + "future_fee_gamma()": FunctionFragment; + "adjustment_step()": FunctionFragment; + "future_adjustment_step()": FunctionFragment; + "ma_half_time()": FunctionFragment; + "future_ma_half_time()": FunctionFragment; + "mid_fee()": FunctionFragment; + "out_fee()": FunctionFragment; + "admin_fee()": FunctionFragment; + "future_mid_fee()": FunctionFragment; + "future_out_fee()": FunctionFragment; + "future_admin_fee()": FunctionFragment; + "balances(uint256)": FunctionFragment; + "D()": FunctionFragment; + "owner()": FunctionFragment; + "future_owner()": FunctionFragment; + "xcp_profit()": FunctionFragment; + "xcp_profit_a()": FunctionFragment; + "virtual_price()": FunctionFragment; + "is_killed()": FunctionFragment; + "kill_deadline()": FunctionFragment; + "transfer_ownership_deadline()": FunctionFragment; + "admin_actions_deadline()": FunctionFragment; + "admin_fee_receiver()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "token" | "coins" | "A" | "gamma" | "fee" | "get_virtual_price" | "price_oracle" | "exchange(uint256,uint256,uint256,uint256)" | "exchange(uint256,uint256,uint256,uint256,bool)" | "exchange(uint256,uint256,uint256,uint256,bool,address)" | "exchange_underlying(uint256,uint256,uint256,uint256)" | "exchange_underlying(uint256,uint256,uint256,uint256,address)" | "exchange_extended" | "get_dy" | "add_liquidity(uint256[2],uint256)" | "add_liquidity(uint256[2],uint256,bool)" | "add_liquidity(uint256[2],uint256,bool,address)" | "remove_liquidity(uint256,uint256[2])" | "remove_liquidity(uint256,uint256[2],bool)" | "remove_liquidity(uint256,uint256[2],bool,address)" | "calc_token_amount" | "calc_withdraw_one_coin" | "remove_liquidity_one_coin(uint256,uint256,uint256)" | "remove_liquidity_one_coin(uint256,uint256,uint256,bool)" | "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)" | "claim_admin_fees" | "ramp_A_gamma" | "stop_ramp_A_gamma" | "commit_new_parameters" | "apply_new_parameters" | "revert_new_parameters" | "commit_transfer_ownership" | "apply_transfer_ownership" | "revert_transfer_ownership" | "kill_me" | "unkill_me" | "set_admin_fee_receiver" | "lp_price" | "price_scale" | "last_prices" | "last_prices_timestamp" | "initial_A_gamma" | "future_A_gamma" | "initial_A_gamma_time" | "future_A_gamma_time" | "allowed_extra_profit" | "future_allowed_extra_profit" | "fee_gamma" | "future_fee_gamma" | "adjustment_step" | "future_adjustment_step" | "ma_half_time" | "future_ma_half_time" | "mid_fee" | "out_fee" | "admin_fee" | "future_mid_fee" | "future_out_fee" | "future_admin_fee" | "balances" | "D" | "owner" | "future_owner" | "xcp_profit" | "xcp_profit_a" | "virtual_price" | "is_killed" | "kill_deadline" | "transfer_ownership_deadline" | "admin_actions_deadline" | "admin_fee_receiver"): FunctionFragment; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData(functionFragment: "coins", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "A", values?: undefined): string; + encodeFunctionData(functionFragment: "gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "fee", values?: undefined): string; + encodeFunctionData(functionFragment: "get_virtual_price", values?: undefined): string; + encodeFunctionData(functionFragment: "price_oracle", values?: undefined): string; + encodeFunctionData(functionFragment: "exchange(uint256,uint256,uint256,uint256)", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "exchange(uint256,uint256,uint256,uint256,bool)", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish, boolean]): string; + encodeFunctionData(functionFragment: "exchange(uint256,uint256,uint256,uint256,bool,address)", values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + boolean, + string + ]): string; + encodeFunctionData(functionFragment: "exchange_underlying(uint256,uint256,uint256,uint256)", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "exchange_underlying(uint256,uint256,uint256,uint256,address)", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish, string]): string; + encodeFunctionData(functionFragment: "exchange_extended", values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + boolean, + string, + string, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "get_dy", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "add_liquidity(uint256[2],uint256)", values: [[BigNumberish, BigNumberish], BigNumberish]): string; + encodeFunctionData(functionFragment: "add_liquidity(uint256[2],uint256,bool)", values: [[BigNumberish, BigNumberish], BigNumberish, boolean]): string; + encodeFunctionData(functionFragment: "add_liquidity(uint256[2],uint256,bool,address)", values: [[BigNumberish, BigNumberish], BigNumberish, boolean, string]): string; + encodeFunctionData(functionFragment: "remove_liquidity(uint256,uint256[2])", values: [BigNumberish, [BigNumberish, BigNumberish]]): string; + encodeFunctionData(functionFragment: "remove_liquidity(uint256,uint256[2],bool)", values: [BigNumberish, [BigNumberish, BigNumberish], boolean]): string; + encodeFunctionData(functionFragment: "remove_liquidity(uint256,uint256[2],bool,address)", values: [BigNumberish, [BigNumberish, BigNumberish], boolean, string]): string; + encodeFunctionData(functionFragment: "calc_token_amount", values: [[BigNumberish, BigNumberish]]): string; + encodeFunctionData(functionFragment: "calc_withdraw_one_coin", values: [BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256)", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256,bool)", values: [BigNumberish, BigNumberish, BigNumberish, boolean]): string; + encodeFunctionData(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)", values: [BigNumberish, BigNumberish, BigNumberish, boolean, string]): string; + encodeFunctionData(functionFragment: "claim_admin_fees", values?: undefined): string; + encodeFunctionData(functionFragment: "ramp_A_gamma", values: [BigNumberish, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "stop_ramp_A_gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "commit_new_parameters", values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + encodeFunctionData(functionFragment: "apply_new_parameters", values?: undefined): string; + encodeFunctionData(functionFragment: "revert_new_parameters", values?: undefined): string; + encodeFunctionData(functionFragment: "commit_transfer_ownership", values: [string]): string; + encodeFunctionData(functionFragment: "apply_transfer_ownership", values?: undefined): string; + encodeFunctionData(functionFragment: "revert_transfer_ownership", values?: undefined): string; + encodeFunctionData(functionFragment: "kill_me", values?: undefined): string; + encodeFunctionData(functionFragment: "unkill_me", values?: undefined): string; + encodeFunctionData(functionFragment: "set_admin_fee_receiver", values: [string]): string; + encodeFunctionData(functionFragment: "lp_price", values?: undefined): string; + encodeFunctionData(functionFragment: "price_scale", values?: undefined): string; + encodeFunctionData(functionFragment: "last_prices", values?: undefined): string; + encodeFunctionData(functionFragment: "last_prices_timestamp", values?: undefined): string; + encodeFunctionData(functionFragment: "initial_A_gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "future_A_gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "initial_A_gamma_time", values?: undefined): string; + encodeFunctionData(functionFragment: "future_A_gamma_time", values?: undefined): string; + encodeFunctionData(functionFragment: "allowed_extra_profit", values?: undefined): string; + encodeFunctionData(functionFragment: "future_allowed_extra_profit", values?: undefined): string; + encodeFunctionData(functionFragment: "fee_gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "future_fee_gamma", values?: undefined): string; + encodeFunctionData(functionFragment: "adjustment_step", values?: undefined): string; + encodeFunctionData(functionFragment: "future_adjustment_step", values?: undefined): string; + encodeFunctionData(functionFragment: "ma_half_time", values?: undefined): string; + encodeFunctionData(functionFragment: "future_ma_half_time", values?: undefined): string; + encodeFunctionData(functionFragment: "mid_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "out_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "admin_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "future_mid_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "future_out_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "future_admin_fee", values?: undefined): string; + encodeFunctionData(functionFragment: "balances", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "D", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "future_owner", values?: undefined): string; + encodeFunctionData(functionFragment: "xcp_profit", values?: undefined): string; + encodeFunctionData(functionFragment: "xcp_profit_a", values?: undefined): string; + encodeFunctionData(functionFragment: "virtual_price", values?: undefined): string; + encodeFunctionData(functionFragment: "is_killed", values?: undefined): string; + encodeFunctionData(functionFragment: "kill_deadline", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer_ownership_deadline", values?: undefined): string; + encodeFunctionData(functionFragment: "admin_actions_deadline", values?: undefined): string; + encodeFunctionData(functionFragment: "admin_fee_receiver", values?: undefined): string; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "coins", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "A", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_virtual_price", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "price_oracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange(uint256,uint256,uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange(uint256,uint256,uint256,uint256,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange(uint256,uint256,uint256,uint256,bool,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_underlying(uint256,uint256,uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_underlying(uint256,uint256,uint256,uint256,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_extended", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_dy", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "add_liquidity(uint256[2],uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "add_liquidity(uint256[2],uint256,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "add_liquidity(uint256[2],uint256,bool,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity(uint256,uint256[2])", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity(uint256,uint256[2],bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity(uint256,uint256[2],bool,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calc_token_amount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "calc_withdraw_one_coin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_admin_fees", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ramp_A_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stop_ramp_A_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commit_new_parameters", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "apply_new_parameters", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revert_new_parameters", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commit_transfer_ownership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "apply_transfer_ownership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revert_transfer_ownership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "kill_me", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unkill_me", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_admin_fee_receiver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lp_price", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "price_scale", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "last_prices", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "last_prices_timestamp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initial_A_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_A_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initial_A_gamma_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_A_gamma_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowed_extra_profit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_allowed_extra_profit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fee_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_fee_gamma", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "adjustment_step", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_adjustment_step", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ma_half_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_ma_half_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mid_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "out_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "admin_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_mid_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_out_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_admin_fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "D", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "xcp_profit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "xcp_profit_a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "virtual_price", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "is_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "kill_deadline", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer_ownership_deadline", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "admin_actions_deadline", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "admin_fee_receiver", data: BytesLike): Result; + events: { + "TokenExchange(address,uint256,uint256,uint256,uint256)": EventFragment; + "AddLiquidity(address,uint256[2],uint256,uint256)": EventFragment; + "RemoveLiquidity(address,uint256[2],uint256)": EventFragment; + "RemoveLiquidityOne(address,uint256,uint256,uint256)": EventFragment; + "CommitNewAdmin(uint256,address)": EventFragment; + "NewAdmin(address)": EventFragment; + "CommitNewParameters(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)": EventFragment; + "NewParameters(uint256,uint256,uint256,uint256,uint256,uint256,uint256)": EventFragment; + "RampAgamma(uint256,uint256,uint256,uint256,uint256,uint256)": EventFragment; + "StopRampA(uint256,uint256,uint256)": EventFragment; + "ClaimAdminFee(address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "TokenExchange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AddLiquidity"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RemoveLiquidity"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RemoveLiquidityOne"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CommitNewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CommitNewParameters"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewParameters"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RampAgamma"): EventFragment; + getEvent(nameOrSignatureOrTopic: "StopRampA"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ClaimAdminFee"): EventFragment; +} +export interface TokenExchangeEventObject { + buyer: string; + sold_id: BigNumber; + tokens_sold: BigNumber; + bought_id: BigNumber; + tokens_bought: BigNumber; +} +export declare type TokenExchangeEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], TokenExchangeEventObject>; +export declare type TokenExchangeEventFilter = TypedEventFilter; +export interface AddLiquidityEventObject { + provider: string; + token_amounts: [BigNumber, BigNumber]; + fee: BigNumber; + token_supply: BigNumber; +} +export declare type AddLiquidityEvent = TypedEvent<[ + string, + [BigNumber, BigNumber], + BigNumber, + BigNumber +], AddLiquidityEventObject>; +export declare type AddLiquidityEventFilter = TypedEventFilter; +export interface RemoveLiquidityEventObject { + provider: string; + token_amounts: [BigNumber, BigNumber]; + token_supply: BigNumber; +} +export declare type RemoveLiquidityEvent = TypedEvent<[ + string, + [BigNumber, BigNumber], + BigNumber +], RemoveLiquidityEventObject>; +export declare type RemoveLiquidityEventFilter = TypedEventFilter; +export interface RemoveLiquidityOneEventObject { + provider: string; + token_amount: BigNumber; + coin_index: BigNumber; + coin_amount: BigNumber; +} +export declare type RemoveLiquidityOneEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber +], RemoveLiquidityOneEventObject>; +export declare type RemoveLiquidityOneEventFilter = TypedEventFilter; +export interface CommitNewAdminEventObject { + deadline: BigNumber; + admin: string; +} +export declare type CommitNewAdminEvent = TypedEvent<[ + BigNumber, + string +], CommitNewAdminEventObject>; +export declare type CommitNewAdminEventFilter = TypedEventFilter; +export interface NewAdminEventObject { + admin: string; +} +export declare type NewAdminEvent = TypedEvent<[string], NewAdminEventObject>; +export declare type NewAdminEventFilter = TypedEventFilter; +export interface CommitNewParametersEventObject { + deadline: BigNumber; + admin_fee: BigNumber; + mid_fee: BigNumber; + out_fee: BigNumber; + fee_gamma: BigNumber; + allowed_extra_profit: BigNumber; + adjustment_step: BigNumber; + ma_half_time: BigNumber; +} +export declare type CommitNewParametersEvent = TypedEvent<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], CommitNewParametersEventObject>; +export declare type CommitNewParametersEventFilter = TypedEventFilter; +export interface NewParametersEventObject { + admin_fee: BigNumber; + mid_fee: BigNumber; + out_fee: BigNumber; + fee_gamma: BigNumber; + allowed_extra_profit: BigNumber; + adjustment_step: BigNumber; + ma_half_time: BigNumber; +} +export declare type NewParametersEvent = TypedEvent<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], NewParametersEventObject>; +export declare type NewParametersEventFilter = TypedEventFilter; +export interface RampAgammaEventObject { + initial_A: BigNumber; + future_A: BigNumber; + initial_gamma: BigNumber; + future_gamma: BigNumber; + initial_time: BigNumber; + future_time: BigNumber; +} +export declare type RampAgammaEvent = TypedEvent<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], RampAgammaEventObject>; +export declare type RampAgammaEventFilter = TypedEventFilter; +export interface StopRampAEventObject { + current_A: BigNumber; + current_gamma: BigNumber; + time: BigNumber; +} +export declare type StopRampAEvent = TypedEvent<[ + BigNumber, + BigNumber, + BigNumber +], StopRampAEventObject>; +export declare type StopRampAEventFilter = TypedEventFilter; +export interface ClaimAdminFeeEventObject { + admin: string; + tokens: BigNumber; +} +export declare type ClaimAdminFeeEvent = TypedEvent<[ + string, + BigNumber +], ClaimAdminFeeEventObject>; +export declare type ClaimAdminFeeEventFilter = TypedEventFilter; +export interface CurveCryptoSwap2ETH extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: CurveCryptoSwap2ETHInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + token(overrides?: CallOverrides): Promise<[string]>; + coins(i: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + A(overrides?: CallOverrides): Promise<[BigNumber]>; + gamma(overrides?: CallOverrides): Promise<[BigNumber]>; + fee(overrides?: CallOverrides): Promise<[BigNumber]>; + get_virtual_price(overrides?: CallOverrides): Promise<[BigNumber]>; + price_oracle(overrides?: CallOverrides): Promise<[BigNumber]>; + "exchange(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + exchange_extended(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, sender: string, receiver: string, cb: BytesLike, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + get_dy(i: BigNumberish, j: BigNumberish, dx: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + "add_liquidity(uint256[2],uint256)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool,address)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2])"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool,address)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + calc_token_amount(amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise<[BigNumber]>; + calc_withdraw_one_coin(token_amount: BigNumberish, i: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + "remove_liquidity_one_coin(uint256,uint256,uint256)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_admin_fees(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ramp_A_gamma(future_A: BigNumberish, future_gamma: BigNumberish, future_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stop_ramp_A_gamma(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_new_parameters(_new_mid_fee: BigNumberish, _new_out_fee: BigNumberish, _new_admin_fee: BigNumberish, _new_fee_gamma: BigNumberish, _new_allowed_extra_profit: BigNumberish, _new_adjustment_step: BigNumberish, _new_ma_half_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_transfer_ownership(_owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + unkill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_admin_fee_receiver(_admin_fee_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lp_price(overrides?: CallOverrides): Promise<[BigNumber]>; + price_scale(overrides?: CallOverrides): Promise<[BigNumber]>; + last_prices(overrides?: CallOverrides): Promise<[BigNumber]>; + last_prices_timestamp(overrides?: CallOverrides): Promise<[BigNumber]>; + initial_A_gamma(overrides?: CallOverrides): Promise<[BigNumber]>; + future_A_gamma(overrides?: CallOverrides): Promise<[BigNumber]>; + initial_A_gamma_time(overrides?: CallOverrides): Promise<[BigNumber]>; + future_A_gamma_time(overrides?: CallOverrides): Promise<[BigNumber]>; + allowed_extra_profit(overrides?: CallOverrides): Promise<[BigNumber]>; + future_allowed_extra_profit(overrides?: CallOverrides): Promise<[BigNumber]>; + fee_gamma(overrides?: CallOverrides): Promise<[BigNumber]>; + future_fee_gamma(overrides?: CallOverrides): Promise<[BigNumber]>; + adjustment_step(overrides?: CallOverrides): Promise<[BigNumber]>; + future_adjustment_step(overrides?: CallOverrides): Promise<[BigNumber]>; + ma_half_time(overrides?: CallOverrides): Promise<[BigNumber]>; + future_ma_half_time(overrides?: CallOverrides): Promise<[BigNumber]>; + mid_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + out_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + admin_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + future_mid_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + future_out_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + future_admin_fee(overrides?: CallOverrides): Promise<[BigNumber]>; + balances(arg0: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + D(overrides?: CallOverrides): Promise<[BigNumber]>; + owner(overrides?: CallOverrides): Promise<[string]>; + future_owner(overrides?: CallOverrides): Promise<[string]>; + xcp_profit(overrides?: CallOverrides): Promise<[BigNumber]>; + xcp_profit_a(overrides?: CallOverrides): Promise<[BigNumber]>; + virtual_price(overrides?: CallOverrides): Promise<[BigNumber]>; + is_killed(overrides?: CallOverrides): Promise<[boolean]>; + kill_deadline(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer_ownership_deadline(overrides?: CallOverrides): Promise<[BigNumber]>; + admin_actions_deadline(overrides?: CallOverrides): Promise<[BigNumber]>; + admin_fee_receiver(overrides?: CallOverrides): Promise<[string]>; + }; + token(overrides?: CallOverrides): Promise; + coins(i: BigNumberish, overrides?: CallOverrides): Promise; + A(overrides?: CallOverrides): Promise; + gamma(overrides?: CallOverrides): Promise; + fee(overrides?: CallOverrides): Promise; + get_virtual_price(overrides?: CallOverrides): Promise; + price_oracle(overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + exchange_extended(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, sender: string, receiver: string, cb: BytesLike, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + get_dy(i: BigNumberish, j: BigNumberish, dx: BigNumberish, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool,address)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2])"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool,address)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + calc_token_amount(amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise; + calc_withdraw_one_coin(token_amount: BigNumberish, i: BigNumberish, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_admin_fees(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ramp_A_gamma(future_A: BigNumberish, future_gamma: BigNumberish, future_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stop_ramp_A_gamma(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_new_parameters(_new_mid_fee: BigNumberish, _new_out_fee: BigNumberish, _new_admin_fee: BigNumberish, _new_fee_gamma: BigNumberish, _new_allowed_extra_profit: BigNumberish, _new_adjustment_step: BigNumberish, _new_ma_half_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_transfer_ownership(_owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + unkill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_admin_fee_receiver(_admin_fee_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lp_price(overrides?: CallOverrides): Promise; + price_scale(overrides?: CallOverrides): Promise; + last_prices(overrides?: CallOverrides): Promise; + last_prices_timestamp(overrides?: CallOverrides): Promise; + initial_A_gamma(overrides?: CallOverrides): Promise; + future_A_gamma(overrides?: CallOverrides): Promise; + initial_A_gamma_time(overrides?: CallOverrides): Promise; + future_A_gamma_time(overrides?: CallOverrides): Promise; + allowed_extra_profit(overrides?: CallOverrides): Promise; + future_allowed_extra_profit(overrides?: CallOverrides): Promise; + fee_gamma(overrides?: CallOverrides): Promise; + future_fee_gamma(overrides?: CallOverrides): Promise; + adjustment_step(overrides?: CallOverrides): Promise; + future_adjustment_step(overrides?: CallOverrides): Promise; + ma_half_time(overrides?: CallOverrides): Promise; + future_ma_half_time(overrides?: CallOverrides): Promise; + mid_fee(overrides?: CallOverrides): Promise; + out_fee(overrides?: CallOverrides): Promise; + admin_fee(overrides?: CallOverrides): Promise; + future_mid_fee(overrides?: CallOverrides): Promise; + future_out_fee(overrides?: CallOverrides): Promise; + future_admin_fee(overrides?: CallOverrides): Promise; + balances(arg0: BigNumberish, overrides?: CallOverrides): Promise; + D(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + future_owner(overrides?: CallOverrides): Promise; + xcp_profit(overrides?: CallOverrides): Promise; + xcp_profit_a(overrides?: CallOverrides): Promise; + virtual_price(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + kill_deadline(overrides?: CallOverrides): Promise; + transfer_ownership_deadline(overrides?: CallOverrides): Promise; + admin_actions_deadline(overrides?: CallOverrides): Promise; + admin_fee_receiver(overrides?: CallOverrides): Promise; + callStatic: { + token(overrides?: CallOverrides): Promise; + coins(i: BigNumberish, overrides?: CallOverrides): Promise; + A(overrides?: CallOverrides): Promise; + gamma(overrides?: CallOverrides): Promise; + fee(overrides?: CallOverrides): Promise; + get_virtual_price(overrides?: CallOverrides): Promise; + price_oracle(overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256,bool)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256,bool,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, receiver: string, overrides?: CallOverrides): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: CallOverrides): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, receiver: string, overrides?: CallOverrides): Promise; + exchange_extended(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, sender: string, receiver: string, cb: BytesLike, overrides?: CallOverrides): Promise; + get_dy(i: BigNumberish, j: BigNumberish, dx: BigNumberish, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256,bool)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256,bool,address)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: CallOverrides): Promise; + "remove_liquidity(uint256,uint256[2])"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise; + "remove_liquidity(uint256,uint256[2],bool)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, overrides?: CallOverrides): Promise; + "remove_liquidity(uint256,uint256[2],bool,address)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, receiver: string, overrides?: CallOverrides): Promise; + calc_token_amount(amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise; + calc_withdraw_one_coin(token_amount: BigNumberish, i: BigNumberish, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: CallOverrides): Promise; + claim_admin_fees(overrides?: CallOverrides): Promise; + ramp_A_gamma(future_A: BigNumberish, future_gamma: BigNumberish, future_time: BigNumberish, overrides?: CallOverrides): Promise; + stop_ramp_A_gamma(overrides?: CallOverrides): Promise; + commit_new_parameters(_new_mid_fee: BigNumberish, _new_out_fee: BigNumberish, _new_admin_fee: BigNumberish, _new_fee_gamma: BigNumberish, _new_allowed_extra_profit: BigNumberish, _new_adjustment_step: BigNumberish, _new_ma_half_time: BigNumberish, overrides?: CallOverrides): Promise; + apply_new_parameters(overrides?: CallOverrides): Promise; + revert_new_parameters(overrides?: CallOverrides): Promise; + commit_transfer_ownership(_owner: string, overrides?: CallOverrides): Promise; + apply_transfer_ownership(overrides?: CallOverrides): Promise; + revert_transfer_ownership(overrides?: CallOverrides): Promise; + kill_me(overrides?: CallOverrides): Promise; + unkill_me(overrides?: CallOverrides): Promise; + set_admin_fee_receiver(_admin_fee_receiver: string, overrides?: CallOverrides): Promise; + lp_price(overrides?: CallOverrides): Promise; + price_scale(overrides?: CallOverrides): Promise; + last_prices(overrides?: CallOverrides): Promise; + last_prices_timestamp(overrides?: CallOverrides): Promise; + initial_A_gamma(overrides?: CallOverrides): Promise; + future_A_gamma(overrides?: CallOverrides): Promise; + initial_A_gamma_time(overrides?: CallOverrides): Promise; + future_A_gamma_time(overrides?: CallOverrides): Promise; + allowed_extra_profit(overrides?: CallOverrides): Promise; + future_allowed_extra_profit(overrides?: CallOverrides): Promise; + fee_gamma(overrides?: CallOverrides): Promise; + future_fee_gamma(overrides?: CallOverrides): Promise; + adjustment_step(overrides?: CallOverrides): Promise; + future_adjustment_step(overrides?: CallOverrides): Promise; + ma_half_time(overrides?: CallOverrides): Promise; + future_ma_half_time(overrides?: CallOverrides): Promise; + mid_fee(overrides?: CallOverrides): Promise; + out_fee(overrides?: CallOverrides): Promise; + admin_fee(overrides?: CallOverrides): Promise; + future_mid_fee(overrides?: CallOverrides): Promise; + future_out_fee(overrides?: CallOverrides): Promise; + future_admin_fee(overrides?: CallOverrides): Promise; + balances(arg0: BigNumberish, overrides?: CallOverrides): Promise; + D(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + future_owner(overrides?: CallOverrides): Promise; + xcp_profit(overrides?: CallOverrides): Promise; + xcp_profit_a(overrides?: CallOverrides): Promise; + virtual_price(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + kill_deadline(overrides?: CallOverrides): Promise; + transfer_ownership_deadline(overrides?: CallOverrides): Promise; + admin_actions_deadline(overrides?: CallOverrides): Promise; + admin_fee_receiver(overrides?: CallOverrides): Promise; + }; + filters: { + "TokenExchange(address,uint256,uint256,uint256,uint256)"(buyer?: string | null, sold_id?: null, tokens_sold?: null, bought_id?: null, tokens_bought?: null): TokenExchangeEventFilter; + TokenExchange(buyer?: string | null, sold_id?: null, tokens_sold?: null, bought_id?: null, tokens_bought?: null): TokenExchangeEventFilter; + "AddLiquidity(address,uint256[2],uint256,uint256)"(provider?: string | null, token_amounts?: null, fee?: null, token_supply?: null): AddLiquidityEventFilter; + AddLiquidity(provider?: string | null, token_amounts?: null, fee?: null, token_supply?: null): AddLiquidityEventFilter; + "RemoveLiquidity(address,uint256[2],uint256)"(provider?: string | null, token_amounts?: null, token_supply?: null): RemoveLiquidityEventFilter; + RemoveLiquidity(provider?: string | null, token_amounts?: null, token_supply?: null): RemoveLiquidityEventFilter; + "RemoveLiquidityOne(address,uint256,uint256,uint256)"(provider?: string | null, token_amount?: null, coin_index?: null, coin_amount?: null): RemoveLiquidityOneEventFilter; + RemoveLiquidityOne(provider?: string | null, token_amount?: null, coin_index?: null, coin_amount?: null): RemoveLiquidityOneEventFilter; + "CommitNewAdmin(uint256,address)"(deadline?: BigNumberish | null, admin?: string | null): CommitNewAdminEventFilter; + CommitNewAdmin(deadline?: BigNumberish | null, admin?: string | null): CommitNewAdminEventFilter; + "NewAdmin(address)"(admin?: string | null): NewAdminEventFilter; + NewAdmin(admin?: string | null): NewAdminEventFilter; + "CommitNewParameters(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"(deadline?: BigNumberish | null, admin_fee?: null, mid_fee?: null, out_fee?: null, fee_gamma?: null, allowed_extra_profit?: null, adjustment_step?: null, ma_half_time?: null): CommitNewParametersEventFilter; + CommitNewParameters(deadline?: BigNumberish | null, admin_fee?: null, mid_fee?: null, out_fee?: null, fee_gamma?: null, allowed_extra_profit?: null, adjustment_step?: null, ma_half_time?: null): CommitNewParametersEventFilter; + "NewParameters(uint256,uint256,uint256,uint256,uint256,uint256,uint256)"(admin_fee?: null, mid_fee?: null, out_fee?: null, fee_gamma?: null, allowed_extra_profit?: null, adjustment_step?: null, ma_half_time?: null): NewParametersEventFilter; + NewParameters(admin_fee?: null, mid_fee?: null, out_fee?: null, fee_gamma?: null, allowed_extra_profit?: null, adjustment_step?: null, ma_half_time?: null): NewParametersEventFilter; + "RampAgamma(uint256,uint256,uint256,uint256,uint256,uint256)"(initial_A?: null, future_A?: null, initial_gamma?: null, future_gamma?: null, initial_time?: null, future_time?: null): RampAgammaEventFilter; + RampAgamma(initial_A?: null, future_A?: null, initial_gamma?: null, future_gamma?: null, initial_time?: null, future_time?: null): RampAgammaEventFilter; + "StopRampA(uint256,uint256,uint256)"(current_A?: null, current_gamma?: null, time?: null): StopRampAEventFilter; + StopRampA(current_A?: null, current_gamma?: null, time?: null): StopRampAEventFilter; + "ClaimAdminFee(address,uint256)"(admin?: string | null, tokens?: null): ClaimAdminFeeEventFilter; + ClaimAdminFee(admin?: string | null, tokens?: null): ClaimAdminFeeEventFilter; + }; + estimateGas: { + token(overrides?: CallOverrides): Promise; + coins(i: BigNumberish, overrides?: CallOverrides): Promise; + A(overrides?: CallOverrides): Promise; + gamma(overrides?: CallOverrides): Promise; + fee(overrides?: CallOverrides): Promise; + get_virtual_price(overrides?: CallOverrides): Promise; + price_oracle(overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + exchange_extended(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, sender: string, receiver: string, cb: BytesLike, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + get_dy(i: BigNumberish, j: BigNumberish, dx: BigNumberish, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool,address)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2])"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool,address)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + calc_token_amount(amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise; + calc_withdraw_one_coin(token_amount: BigNumberish, i: BigNumberish, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_admin_fees(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ramp_A_gamma(future_A: BigNumberish, future_gamma: BigNumberish, future_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stop_ramp_A_gamma(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_new_parameters(_new_mid_fee: BigNumberish, _new_out_fee: BigNumberish, _new_admin_fee: BigNumberish, _new_fee_gamma: BigNumberish, _new_allowed_extra_profit: BigNumberish, _new_adjustment_step: BigNumberish, _new_ma_half_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_transfer_ownership(_owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + unkill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_admin_fee_receiver(_admin_fee_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lp_price(overrides?: CallOverrides): Promise; + price_scale(overrides?: CallOverrides): Promise; + last_prices(overrides?: CallOverrides): Promise; + last_prices_timestamp(overrides?: CallOverrides): Promise; + initial_A_gamma(overrides?: CallOverrides): Promise; + future_A_gamma(overrides?: CallOverrides): Promise; + initial_A_gamma_time(overrides?: CallOverrides): Promise; + future_A_gamma_time(overrides?: CallOverrides): Promise; + allowed_extra_profit(overrides?: CallOverrides): Promise; + future_allowed_extra_profit(overrides?: CallOverrides): Promise; + fee_gamma(overrides?: CallOverrides): Promise; + future_fee_gamma(overrides?: CallOverrides): Promise; + adjustment_step(overrides?: CallOverrides): Promise; + future_adjustment_step(overrides?: CallOverrides): Promise; + ma_half_time(overrides?: CallOverrides): Promise; + future_ma_half_time(overrides?: CallOverrides): Promise; + mid_fee(overrides?: CallOverrides): Promise; + out_fee(overrides?: CallOverrides): Promise; + admin_fee(overrides?: CallOverrides): Promise; + future_mid_fee(overrides?: CallOverrides): Promise; + future_out_fee(overrides?: CallOverrides): Promise; + future_admin_fee(overrides?: CallOverrides): Promise; + balances(arg0: BigNumberish, overrides?: CallOverrides): Promise; + D(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + future_owner(overrides?: CallOverrides): Promise; + xcp_profit(overrides?: CallOverrides): Promise; + xcp_profit_a(overrides?: CallOverrides): Promise; + virtual_price(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + kill_deadline(overrides?: CallOverrides): Promise; + transfer_ownership_deadline(overrides?: CallOverrides): Promise; + admin_actions_deadline(overrides?: CallOverrides): Promise; + admin_fee_receiver(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + token(overrides?: CallOverrides): Promise; + coins(i: BigNumberish, overrides?: CallOverrides): Promise; + A(overrides?: CallOverrides): Promise; + gamma(overrides?: CallOverrides): Promise; + fee(overrides?: CallOverrides): Promise; + get_virtual_price(overrides?: CallOverrides): Promise; + price_oracle(overrides?: CallOverrides): Promise; + "exchange(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(uint256,uint256,uint256,uint256,bool,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_underlying(uint256,uint256,uint256,uint256,address)"(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + exchange_extended(i: BigNumberish, j: BigNumberish, dx: BigNumberish, min_dy: BigNumberish, use_eth: boolean, sender: string, receiver: string, cb: BytesLike, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + get_dy(i: BigNumberish, j: BigNumberish, dx: BigNumberish, overrides?: CallOverrides): Promise; + "add_liquidity(uint256[2],uint256)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "add_liquidity(uint256[2],uint256,bool,address)"(amounts: [BigNumberish, BigNumberish], min_mint_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2])"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity(uint256,uint256[2],bool,address)"(_amount: BigNumberish, min_amounts: [BigNumberish, BigNumberish], use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + calc_token_amount(amounts: [BigNumberish, BigNumberish], overrides?: CallOverrides): Promise; + calc_withdraw_one_coin(token_amount: BigNumberish, i: BigNumberish, overrides?: CallOverrides): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "remove_liquidity_one_coin(uint256,uint256,uint256,bool,address)"(token_amount: BigNumberish, i: BigNumberish, min_amount: BigNumberish, use_eth: boolean, receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_admin_fees(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ramp_A_gamma(future_A: BigNumberish, future_gamma: BigNumberish, future_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stop_ramp_A_gamma(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_new_parameters(_new_mid_fee: BigNumberish, _new_out_fee: BigNumberish, _new_admin_fee: BigNumberish, _new_fee_gamma: BigNumberish, _new_allowed_extra_profit: BigNumberish, _new_adjustment_step: BigNumberish, _new_ma_half_time: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_new_parameters(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commit_transfer_ownership(_owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + apply_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + revert_transfer_ownership(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + unkill_me(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_admin_fee_receiver(_admin_fee_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + lp_price(overrides?: CallOverrides): Promise; + price_scale(overrides?: CallOverrides): Promise; + last_prices(overrides?: CallOverrides): Promise; + last_prices_timestamp(overrides?: CallOverrides): Promise; + initial_A_gamma(overrides?: CallOverrides): Promise; + future_A_gamma(overrides?: CallOverrides): Promise; + initial_A_gamma_time(overrides?: CallOverrides): Promise; + future_A_gamma_time(overrides?: CallOverrides): Promise; + allowed_extra_profit(overrides?: CallOverrides): Promise; + future_allowed_extra_profit(overrides?: CallOverrides): Promise; + fee_gamma(overrides?: CallOverrides): Promise; + future_fee_gamma(overrides?: CallOverrides): Promise; + adjustment_step(overrides?: CallOverrides): Promise; + future_adjustment_step(overrides?: CallOverrides): Promise; + ma_half_time(overrides?: CallOverrides): Promise; + future_ma_half_time(overrides?: CallOverrides): Promise; + mid_fee(overrides?: CallOverrides): Promise; + out_fee(overrides?: CallOverrides): Promise; + admin_fee(overrides?: CallOverrides): Promise; + future_mid_fee(overrides?: CallOverrides): Promise; + future_out_fee(overrides?: CallOverrides): Promise; + future_admin_fee(overrides?: CallOverrides): Promise; + balances(arg0: BigNumberish, overrides?: CallOverrides): Promise; + D(overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + future_owner(overrides?: CallOverrides): Promise; + xcp_profit(overrides?: CallOverrides): Promise; + xcp_profit_a(overrides?: CallOverrides): Promise; + virtual_price(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + kill_deadline(overrides?: CallOverrides): Promise; + transfer_ownership_deadline(overrides?: CallOverrides): Promise; + admin_actions_deadline(overrides?: CallOverrides): Promise; + admin_fee_receiver(overrides?: CallOverrides): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.d.ts new file mode 100644 index 0000000..41d612b --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.d.ts @@ -0,0 +1,790 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface CurveLiquidityGaugeV5Interface extends utils.Interface { + functions: { + "deposit(uint256)": FunctionFragment; + "deposit(uint256,address)": FunctionFragment; + "deposit(uint256,address,bool)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + "withdraw(uint256,bool)": FunctionFragment; + "claim_rewards()": FunctionFragment; + "claim_rewards(address)": FunctionFragment; + "claim_rewards(address,address)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "user_checkpoint(address)": FunctionFragment; + "set_rewards_receiver(address)": FunctionFragment; + "kick(address)": FunctionFragment; + "deposit_reward_token(address,uint256)": FunctionFragment; + "add_reward(address,address)": FunctionFragment; + "set_reward_distributor(address,address)": FunctionFragment; + "set_killed(bool)": FunctionFragment; + "claimed_reward(address,address)": FunctionFragment; + "claimable_reward(address,address)": FunctionFragment; + "claimable_tokens(address)": FunctionFragment; + "integrate_checkpoint()": FunctionFragment; + "future_epoch_time()": FunctionFragment; + "inflation_rate()": FunctionFragment; + "decimals()": FunctionFragment; + "version()": FunctionFragment; + "initialize(address)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "totalSupply()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "nonces(address)": FunctionFragment; + "factory()": FunctionFragment; + "lp_token()": FunctionFragment; + "is_killed()": FunctionFragment; + "reward_count()": FunctionFragment; + "reward_data(address)": FunctionFragment; + "rewards_receiver(address)": FunctionFragment; + "reward_integral_for(address,address)": FunctionFragment; + "working_balances(address)": FunctionFragment; + "working_supply()": FunctionFragment; + "integrate_inv_supply_of(address)": FunctionFragment; + "integrate_checkpoint_of(address)": FunctionFragment; + "integrate_fraction(address)": FunctionFragment; + "period()": FunctionFragment; + "reward_tokens(uint256)": FunctionFragment; + "period_timestamp(uint256)": FunctionFragment; + "integrate_inv_supply(uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "deposit(uint256)" | "deposit(uint256,address)" | "deposit(uint256,address,bool)" | "withdraw(uint256)" | "withdraw(uint256,bool)" | "claim_rewards()" | "claim_rewards(address)" | "claim_rewards(address,address)" | "transferFrom" | "transfer" | "approve" | "permit" | "increaseAllowance" | "decreaseAllowance" | "user_checkpoint" | "set_rewards_receiver" | "kick" | "deposit_reward_token" | "add_reward" | "set_reward_distributor" | "set_killed" | "claimed_reward" | "claimable_reward" | "claimable_tokens" | "integrate_checkpoint" | "future_epoch_time" | "inflation_rate" | "decimals" | "version" | "initialize" | "balanceOf" | "totalSupply" | "allowance" | "name" | "symbol" | "DOMAIN_SEPARATOR" | "nonces" | "factory" | "lp_token" | "is_killed" | "reward_count" | "reward_data" | "rewards_receiver" | "reward_integral_for" | "working_balances" | "working_supply" | "integrate_inv_supply_of" | "integrate_checkpoint_of" | "integrate_fraction" | "period" | "reward_tokens" | "period_timestamp" | "integrate_inv_supply"): FunctionFragment; + encodeFunctionData(functionFragment: "deposit(uint256)", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "deposit(uint256,address)", values: [BigNumberish, string]): string; + encodeFunctionData(functionFragment: "deposit(uint256,address,bool)", values: [BigNumberish, string, boolean]): string; + encodeFunctionData(functionFragment: "withdraw(uint256)", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "withdraw(uint256,bool)", values: [BigNumberish, boolean]): string; + encodeFunctionData(functionFragment: "claim_rewards()", values?: undefined): string; + encodeFunctionData(functionFragment: "claim_rewards(address)", values: [string]): string; + encodeFunctionData(functionFragment: "claim_rewards(address,address)", values: [string, string]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "permit", values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "user_checkpoint", values: [string]): string; + encodeFunctionData(functionFragment: "set_rewards_receiver", values: [string]): string; + encodeFunctionData(functionFragment: "kick", values: [string]): string; + encodeFunctionData(functionFragment: "deposit_reward_token", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "add_reward", values: [string, string]): string; + encodeFunctionData(functionFragment: "set_reward_distributor", values: [string, string]): string; + encodeFunctionData(functionFragment: "set_killed", values: [boolean]): string; + encodeFunctionData(functionFragment: "claimed_reward", values: [string, string]): string; + encodeFunctionData(functionFragment: "claimable_reward", values: [string, string]): string; + encodeFunctionData(functionFragment: "claimable_tokens", values: [string]): string; + encodeFunctionData(functionFragment: "integrate_checkpoint", values?: undefined): string; + encodeFunctionData(functionFragment: "future_epoch_time", values?: undefined): string; + encodeFunctionData(functionFragment: "inflation_rate", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData(functionFragment: "initialize", values: [string]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData(functionFragment: "lp_token", values?: undefined): string; + encodeFunctionData(functionFragment: "is_killed", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_count", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_data", values: [string]): string; + encodeFunctionData(functionFragment: "rewards_receiver", values: [string]): string; + encodeFunctionData(functionFragment: "reward_integral_for", values: [string, string]): string; + encodeFunctionData(functionFragment: "working_balances", values: [string]): string; + encodeFunctionData(functionFragment: "working_supply", values?: undefined): string; + encodeFunctionData(functionFragment: "integrate_inv_supply_of", values: [string]): string; + encodeFunctionData(functionFragment: "integrate_checkpoint_of", values: [string]): string; + encodeFunctionData(functionFragment: "integrate_fraction", values: [string]): string; + encodeFunctionData(functionFragment: "period", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_tokens", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "period_timestamp", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "integrate_inv_supply", values: [BigNumberish]): string; + decodeFunctionResult(functionFragment: "deposit(uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit(uint256,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit(uint256,address,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw(uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw(uint256,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards()", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards(address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards(address,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "user_checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_rewards_receiver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "kick", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit_reward_token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "add_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_reward_distributor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimed_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimable_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimable_tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_epoch_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inflation_rate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lp_token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "is_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_count", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_data", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rewards_receiver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_integral_for", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "working_balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "working_supply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_inv_supply_of", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_checkpoint_of", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_fraction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "period", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "period_timestamp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_inv_supply", data: BytesLike): Result; + events: { + "Deposit(address,uint256)": EventFragment; + "Withdraw(address,uint256)": EventFragment; + "UpdateLiquidityLimit(address,uint256,uint256,uint256,uint256)": EventFragment; + "CommitOwnership(address)": EventFragment; + "ApplyOwnership(address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "Approval(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdateLiquidityLimit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CommitOwnership"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ApplyOwnership"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; +} +export interface DepositEventObject { + provider: string; + value: BigNumber; +} +export declare type DepositEvent = TypedEvent<[string, BigNumber], DepositEventObject>; +export declare type DepositEventFilter = TypedEventFilter; +export interface WithdrawEventObject { + provider: string; + value: BigNumber; +} +export declare type WithdrawEvent = TypedEvent<[ + string, + BigNumber +], WithdrawEventObject>; +export declare type WithdrawEventFilter = TypedEventFilter; +export interface UpdateLiquidityLimitEventObject { + user: string; + original_balance: BigNumber; + original_supply: BigNumber; + working_balance: BigNumber; + working_supply: BigNumber; +} +export declare type UpdateLiquidityLimitEvent = TypedEvent<[ + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber +], UpdateLiquidityLimitEventObject>; +export declare type UpdateLiquidityLimitEventFilter = TypedEventFilter; +export interface CommitOwnershipEventObject { + admin: string; +} +export declare type CommitOwnershipEvent = TypedEvent<[ + string +], CommitOwnershipEventObject>; +export declare type CommitOwnershipEventFilter = TypedEventFilter; +export interface ApplyOwnershipEventObject { + admin: string; +} +export declare type ApplyOwnershipEvent = TypedEvent<[ + string +], ApplyOwnershipEventObject>; +export declare type ApplyOwnershipEventFilter = TypedEventFilter; +export interface TransferEventObject { + _from: string; + _to: string; + _value: BigNumber; +} +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], TransferEventObject>; +export declare type TransferEventFilter = TypedEventFilter; +export interface ApprovalEventObject { + _owner: string; + _spender: string; + _value: BigNumber; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], ApprovalEventObject>; +export declare type ApprovalEventFilter = TypedEventFilter; +export interface CurveLiquidityGaugeV5 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: CurveLiquidityGaugeV5Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + "deposit(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address)"(_value: BigNumberish, _addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address,bool)"(_value: BigNumberish, _addr: string, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256,bool)"(_value: BigNumberish, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address)"(_addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address,address)"(_addr: string, _receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(_from: string, _to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transfer(_to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + approve(_spender: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + permit(_owner: string, _spender: string, _value: BigNumberish, _deadline: BigNumberish, _v: BigNumberish, _r: BytesLike, _s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(_spender: string, _added_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + decreaseAllowance(_spender: string, _subtracted_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + user_checkpoint(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_rewards_receiver(_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kick(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + deposit_reward_token(_reward_token: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + add_reward(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_reward_distributor(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimed_reward(_addr: string, _token: string, overrides?: CallOverrides): Promise<[BigNumber]>; + claimable_reward(_user: string, _reward_token: string, overrides?: CallOverrides): Promise<[BigNumber]>; + claimable_tokens(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise<[BigNumber]>; + future_epoch_time(overrides?: CallOverrides): Promise<[BigNumber]>; + inflation_rate(overrides?: CallOverrides): Promise<[BigNumber]>; + decimals(overrides?: CallOverrides): Promise<[BigNumber]>; + version(overrides?: CallOverrides): Promise<[string]>; + initialize(_lp_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + allowance(arg0: string, arg1: string, overrides?: CallOverrides): Promise<[BigNumber]>; + name(overrides?: CallOverrides): Promise<[string]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + factory(overrides?: CallOverrides): Promise<[string]>; + lp_token(overrides?: CallOverrides): Promise<[string]>; + is_killed(overrides?: CallOverrides): Promise<[boolean]>; + reward_count(overrides?: CallOverrides): Promise<[BigNumber]>; + reward_data(arg0: string, overrides?: CallOverrides): Promise<[ + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + token: string; + distributor: string; + period_finish: BigNumber; + rate: BigNumber; + last_update: BigNumber; + integral: BigNumber; + } + ]>; + rewards_receiver(arg0: string, overrides?: CallOverrides): Promise<[string]>; + reward_integral_for(arg0: string, arg1: string, overrides?: CallOverrides): Promise<[BigNumber]>; + working_balances(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + working_supply(overrides?: CallOverrides): Promise<[BigNumber]>; + integrate_inv_supply_of(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + integrate_checkpoint_of(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + integrate_fraction(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + period(overrides?: CallOverrides): Promise<[BigNumber]>; + reward_tokens(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + period_timestamp(arg0: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + integrate_inv_supply(arg0: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + }; + "deposit(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address)"(_value: BigNumberish, _addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address,bool)"(_value: BigNumberish, _addr: string, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256,bool)"(_value: BigNumberish, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address)"(_addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address,address)"(_addr: string, _receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(_from: string, _to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transfer(_to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + approve(_spender: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + permit(_owner: string, _spender: string, _value: BigNumberish, _deadline: BigNumberish, _v: BigNumberish, _r: BytesLike, _s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(_spender: string, _added_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + decreaseAllowance(_spender: string, _subtracted_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + user_checkpoint(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_rewards_receiver(_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kick(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + deposit_reward_token(_reward_token: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + add_reward(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_reward_distributor(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimed_reward(_addr: string, _token: string, overrides?: CallOverrides): Promise; + claimable_reward(_user: string, _reward_token: string, overrides?: CallOverrides): Promise; + claimable_tokens(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + initialize(_lp_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(arg0: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + allowance(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: string, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: string, overrides?: CallOverrides): Promise<[ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + token: string; + distributor: string; + period_finish: BigNumber; + rate: BigNumber; + last_update: BigNumber; + integral: BigNumber; + }>; + rewards_receiver(arg0: string, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + working_balances(arg0: string, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: string, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; + period_timestamp(arg0: BigNumberish, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: BigNumberish, overrides?: CallOverrides): Promise; + callStatic: { + "deposit(uint256)"(_value: BigNumberish, overrides?: CallOverrides): Promise; + "deposit(uint256,address)"(_value: BigNumberish, _addr: string, overrides?: CallOverrides): Promise; + "deposit(uint256,address,bool)"(_value: BigNumberish, _addr: string, _claim_rewards: boolean, overrides?: CallOverrides): Promise; + "withdraw(uint256)"(_value: BigNumberish, overrides?: CallOverrides): Promise; + "withdraw(uint256,bool)"(_value: BigNumberish, _claim_rewards: boolean, overrides?: CallOverrides): Promise; + "claim_rewards()"(overrides?: CallOverrides): Promise; + "claim_rewards(address)"(_addr: string, overrides?: CallOverrides): Promise; + "claim_rewards(address,address)"(_addr: string, _receiver: string, overrides?: CallOverrides): Promise; + transferFrom(_from: string, _to: string, _value: BigNumberish, overrides?: CallOverrides): Promise; + transfer(_to: string, _value: BigNumberish, overrides?: CallOverrides): Promise; + approve(_spender: string, _value: BigNumberish, overrides?: CallOverrides): Promise; + permit(_owner: string, _spender: string, _value: BigNumberish, _deadline: BigNumberish, _v: BigNumberish, _r: BytesLike, _s: BytesLike, overrides?: CallOverrides): Promise; + increaseAllowance(_spender: string, _added_value: BigNumberish, overrides?: CallOverrides): Promise; + decreaseAllowance(_spender: string, _subtracted_value: BigNumberish, overrides?: CallOverrides): Promise; + user_checkpoint(addr: string, overrides?: CallOverrides): Promise; + set_rewards_receiver(_receiver: string, overrides?: CallOverrides): Promise; + kick(addr: string, overrides?: CallOverrides): Promise; + deposit_reward_token(_reward_token: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + add_reward(_reward_token: string, _distributor: string, overrides?: CallOverrides): Promise; + set_reward_distributor(_reward_token: string, _distributor: string, overrides?: CallOverrides): Promise; + set_killed(_is_killed: boolean, overrides?: CallOverrides): Promise; + claimed_reward(_addr: string, _token: string, overrides?: CallOverrides): Promise; + claimable_reward(_user: string, _reward_token: string, overrides?: CallOverrides): Promise; + claimable_tokens(addr: string, overrides?: CallOverrides): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + initialize(_lp_token: string, overrides?: CallOverrides): Promise; + balanceOf(arg0: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + allowance(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: string, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: string, overrides?: CallOverrides): Promise<[ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + token: string; + distributor: string; + period_finish: BigNumber; + rate: BigNumber; + last_update: BigNumber; + integral: BigNumber; + }>; + rewards_receiver(arg0: string, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + working_balances(arg0: string, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: string, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; + period_timestamp(arg0: BigNumberish, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: { + "Deposit(address,uint256)"(provider?: string | null, value?: null): DepositEventFilter; + Deposit(provider?: string | null, value?: null): DepositEventFilter; + "Withdraw(address,uint256)"(provider?: string | null, value?: null): WithdrawEventFilter; + Withdraw(provider?: string | null, value?: null): WithdrawEventFilter; + "UpdateLiquidityLimit(address,uint256,uint256,uint256,uint256)"(user?: string | null, original_balance?: null, original_supply?: null, working_balance?: null, working_supply?: null): UpdateLiquidityLimitEventFilter; + UpdateLiquidityLimit(user?: string | null, original_balance?: null, original_supply?: null, working_balance?: null, working_supply?: null): UpdateLiquidityLimitEventFilter; + "CommitOwnership(address)"(admin?: null): CommitOwnershipEventFilter; + CommitOwnership(admin?: null): CommitOwnershipEventFilter; + "ApplyOwnership(address)"(admin?: null): ApplyOwnershipEventFilter; + ApplyOwnership(admin?: null): ApplyOwnershipEventFilter; + "Transfer(address,address,uint256)"(_from?: string | null, _to?: string | null, _value?: null): TransferEventFilter; + Transfer(_from?: string | null, _to?: string | null, _value?: null): TransferEventFilter; + "Approval(address,address,uint256)"(_owner?: string | null, _spender?: string | null, _value?: null): ApprovalEventFilter; + Approval(_owner?: string | null, _spender?: string | null, _value?: null): ApprovalEventFilter; + }; + estimateGas: { + "deposit(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address)"(_value: BigNumberish, _addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address,bool)"(_value: BigNumberish, _addr: string, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256,bool)"(_value: BigNumberish, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address)"(_addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address,address)"(_addr: string, _receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(_from: string, _to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transfer(_to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + approve(_spender: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + permit(_owner: string, _spender: string, _value: BigNumberish, _deadline: BigNumberish, _v: BigNumberish, _r: BytesLike, _s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(_spender: string, _added_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + decreaseAllowance(_spender: string, _subtracted_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + user_checkpoint(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_rewards_receiver(_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kick(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + deposit_reward_token(_reward_token: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + add_reward(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_reward_distributor(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimed_reward(_addr: string, _token: string, overrides?: CallOverrides): Promise; + claimable_reward(_user: string, _reward_token: string, overrides?: CallOverrides): Promise; + claimable_tokens(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + initialize(_lp_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(arg0: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + allowance(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: string, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: string, overrides?: CallOverrides): Promise; + rewards_receiver(arg0: string, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + working_balances(arg0: string, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: string, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; + period_timestamp(arg0: BigNumberish, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + "deposit(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address)"(_value: BigNumberish, _addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "deposit(uint256,address,bool)"(_value: BigNumberish, _addr: string, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256)"(_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "withdraw(uint256,bool)"(_value: BigNumberish, _claim_rewards: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address)"(_addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "claim_rewards(address,address)"(_addr: string, _receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(_from: string, _to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transfer(_to: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + approve(_spender: string, _value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + permit(_owner: string, _spender: string, _value: BigNumberish, _deadline: BigNumberish, _v: BigNumberish, _r: BytesLike, _s: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + increaseAllowance(_spender: string, _added_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + decreaseAllowance(_spender: string, _subtracted_value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + user_checkpoint(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_rewards_receiver(_receiver: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + kick(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + deposit_reward_token(_reward_token: string, _amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + add_reward(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_reward_distributor(_reward_token: string, _distributor: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimed_reward(_addr: string, _token: string, overrides?: CallOverrides): Promise; + claimable_reward(_user: string, _reward_token: string, overrides?: CallOverrides): Promise; + claimable_tokens(addr: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + initialize(_lp_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(arg0: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + allowance(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: string, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: string, overrides?: CallOverrides): Promise; + rewards_receiver(arg0: string, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: string, arg1: string, overrides?: CallOverrides): Promise; + working_balances(arg0: string, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: string, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: string, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: BigNumberish, overrides?: CallOverrides): Promise; + period_timestamp(arg0: BigNumberish, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: BigNumberish, overrides?: CallOverrides): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.d.ts new file mode 100644 index 0000000..40d1f90 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.d.ts @@ -0,0 +1,1027 @@ +import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface CurveRegistrySwapsInterface extends utils.Interface { + functions: { + "exchange_with_best_rate(address,address,uint256,uint256)": FunctionFragment; + "exchange_with_best_rate(address,address,uint256,uint256,address)": FunctionFragment; + "exchange(address,address,address,uint256,uint256)": FunctionFragment; + "exchange(address,address,address,uint256,uint256,address)": FunctionFragment; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)": FunctionFragment; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])": FunctionFragment; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)": FunctionFragment; + "get_best_rate(address,address,uint256)": FunctionFragment; + "get_best_rate(address,address,uint256,address[8])": FunctionFragment; + "get_exchange_amount(address,address,address,uint256)": FunctionFragment; + "get_input_amount(address,address,address,uint256)": FunctionFragment; + "get_exchange_amounts(address,address,address,uint256[100])": FunctionFragment; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)": FunctionFragment; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])": FunctionFragment; + "get_calculator(address)": FunctionFragment; + "update_registry_address()": FunctionFragment; + "set_calculator(address,address)": FunctionFragment; + "set_default_calculator(address)": FunctionFragment; + "claim_balance(address)": FunctionFragment; + "set_killed(bool)": FunctionFragment; + "registry()": FunctionFragment; + "factory_registry()": FunctionFragment; + "crypto_registry()": FunctionFragment; + "default_calculator()": FunctionFragment; + "is_killed()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "exchange_with_best_rate(address,address,uint256,uint256)" | "exchange_with_best_rate(address,address,uint256,uint256,address)" | "exchange(address,address,address,uint256,uint256)" | "exchange(address,address,address,uint256,uint256,address)" | "exchange_multiple(address[9],uint256[3][4],uint256,uint256)" | "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])" | "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)" | "get_best_rate(address,address,uint256)" | "get_best_rate(address,address,uint256,address[8])" | "get_exchange_amount" | "get_input_amount" | "get_exchange_amounts" | "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)" | "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])" | "get_calculator" | "update_registry_address" | "set_calculator" | "set_default_calculator" | "claim_balance" | "set_killed" | "registry" | "factory_registry" | "crypto_registry" | "default_calculator" | "is_killed"): FunctionFragment; + encodeFunctionData(functionFragment: "exchange_with_best_rate(address,address,uint256,uint256)", values: [string, string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "exchange_with_best_rate(address,address,uint256,uint256,address)", values: [string, string, BigNumberish, BigNumberish, string]): string; + encodeFunctionData(functionFragment: "exchange(address,address,address,uint256,uint256)", values: [string, string, string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "exchange(address,address,address,uint256,uint256,address)", values: [string, string, string, BigNumberish, BigNumberish, string]): string; + encodeFunctionData(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256)", values: [ + string[], + [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], + BigNumberish, + BigNumberish + ]): string; + encodeFunctionData(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])", values: [ + string[], + [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], + BigNumberish, + BigNumberish, + [ + string, + string, + string, + string + ] + ]): string; + encodeFunctionData(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)", values: [ + string[], + [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], + BigNumberish, + BigNumberish, + [ + string, + string, + string, + string + ], + string + ]): string; + encodeFunctionData(functionFragment: "get_best_rate(address,address,uint256)", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "get_best_rate(address,address,uint256,address[8])", values: [string, string, BigNumberish, string[]]): string; + encodeFunctionData(functionFragment: "get_exchange_amount", values: [string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "get_input_amount", values: [string, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "get_exchange_amounts", values: [string, string, string, BigNumberish[]]): string; + encodeFunctionData(functionFragment: "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)", values: [ + string[], + [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], + BigNumberish + ]): string; + encodeFunctionData(functionFragment: "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])", values: [ + string[], + [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], + BigNumberish, + [ + string, + string, + string, + string + ] + ]): string; + encodeFunctionData(functionFragment: "get_calculator", values: [string]): string; + encodeFunctionData(functionFragment: "update_registry_address", values?: undefined): string; + encodeFunctionData(functionFragment: "set_calculator", values: [string, string]): string; + encodeFunctionData(functionFragment: "set_default_calculator", values: [string]): string; + encodeFunctionData(functionFragment: "claim_balance", values: [string]): string; + encodeFunctionData(functionFragment: "set_killed", values: [boolean]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "factory_registry", values?: undefined): string; + encodeFunctionData(functionFragment: "crypto_registry", values?: undefined): string; + encodeFunctionData(functionFragment: "default_calculator", values?: undefined): string; + encodeFunctionData(functionFragment: "is_killed", values?: undefined): string; + decodeFunctionResult(functionFragment: "exchange_with_best_rate(address,address,uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_with_best_rate(address,address,uint256,uint256,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange(address,address,address,uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange(address,address,address,uint256,uint256,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_best_rate(address,address,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_best_rate(address,address,uint256,address[8])", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_exchange_amount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_input_amount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_exchange_amounts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_calculator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "update_registry_address", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_calculator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_default_calculator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_balance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory_registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "crypto_registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "default_calculator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "is_killed", data: BytesLike): Result; + events: { + "TokenExchange(address,address,address,address,address,uint256,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "TokenExchange"): EventFragment; +} +export interface TokenExchangeEventObject { + buyer: string; + receiver: string; + pool: string; + token_sold: string; + token_bought: string; + amount_sold: BigNumber; + amount_bought: BigNumber; +} +export declare type TokenExchangeEvent = TypedEvent<[ + string, + string, + string, + string, + string, + BigNumber, + BigNumber +], TokenExchangeEventObject>; +export declare type TokenExchangeEventFilter = TypedEventFilter; +export interface CurveRegistrySwaps extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: CurveRegistrySwapsInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + "exchange_with_best_rate(address,address,uint256,uint256)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_with_best_rate(address,address,uint256,uint256,address)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256,address)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "get_best_rate(address,address,uint256)"(_from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber]>; + "get_best_rate(address,address,uint256,address[8])"(_from: string, _to: string, _amount: BigNumberish, _exclude_pools: string[], overrides?: CallOverrides): Promise<[string, BigNumber]>; + get_exchange_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + get_input_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + get_exchange_amounts(_pool: string, _from: string, _to: string, _amounts: BigNumberish[], overrides?: CallOverrides): Promise<[BigNumber[]]>; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise<[BigNumber]>; + get_calculator(_pool: string, overrides?: CallOverrides): Promise<[string]>; + update_registry_address(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_calculator(_pool: string, _calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_default_calculator(_calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_balance(_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise<[string]>; + factory_registry(overrides?: CallOverrides): Promise<[string]>; + crypto_registry(overrides?: CallOverrides): Promise<[string]>; + default_calculator(overrides?: CallOverrides): Promise<[string]>; + is_killed(overrides?: CallOverrides): Promise<[boolean]>; + }; + "exchange_with_best_rate(address,address,uint256,uint256)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_with_best_rate(address,address,uint256,uint256,address)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256,address)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "get_best_rate(address,address,uint256)"(_from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber]>; + "get_best_rate(address,address,uint256,address[8])"(_from: string, _to: string, _amount: BigNumberish, _exclude_pools: string[], overrides?: CallOverrides): Promise<[string, BigNumber]>; + get_exchange_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_input_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_exchange_amounts(_pool: string, _from: string, _to: string, _amounts: BigNumberish[], overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise; + get_calculator(_pool: string, overrides?: CallOverrides): Promise; + update_registry_address(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_calculator(_pool: string, _calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_default_calculator(_calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_balance(_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + factory_registry(overrides?: CallOverrides): Promise; + crypto_registry(overrides?: CallOverrides): Promise; + default_calculator(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + callStatic: { + "exchange_with_best_rate(address,address,uint256,uint256)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: CallOverrides): Promise; + "exchange_with_best_rate(address,address,uint256,uint256,address)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: CallOverrides): Promise; + "exchange(address,address,address,uint256,uint256)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: CallOverrides): Promise; + "exchange(address,address,address,uint256,uint256,address)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: CallOverrides): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, overrides?: CallOverrides): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], _receiver: string, overrides?: CallOverrides): Promise; + "get_best_rate(address,address,uint256)"(_from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber]>; + "get_best_rate(address,address,uint256,address[8])"(_from: string, _to: string, _amount: BigNumberish, _exclude_pools: string[], overrides?: CallOverrides): Promise<[string, BigNumber]>; + get_exchange_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_input_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_exchange_amounts(_pool: string, _from: string, _to: string, _amounts: BigNumberish[], overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise; + get_calculator(_pool: string, overrides?: CallOverrides): Promise; + update_registry_address(overrides?: CallOverrides): Promise; + set_calculator(_pool: string, _calculator: string, overrides?: CallOverrides): Promise; + set_default_calculator(_calculator: string, overrides?: CallOverrides): Promise; + claim_balance(_token: string, overrides?: CallOverrides): Promise; + set_killed(_is_killed: boolean, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + factory_registry(overrides?: CallOverrides): Promise; + crypto_registry(overrides?: CallOverrides): Promise; + default_calculator(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + }; + filters: { + "TokenExchange(address,address,address,address,address,uint256,uint256)"(buyer?: string | null, receiver?: string | null, pool?: string | null, token_sold?: null, token_bought?: null, amount_sold?: null, amount_bought?: null): TokenExchangeEventFilter; + TokenExchange(buyer?: string | null, receiver?: string | null, pool?: string | null, token_sold?: null, token_bought?: null, amount_sold?: null, amount_bought?: null): TokenExchangeEventFilter; + }; + estimateGas: { + "exchange_with_best_rate(address,address,uint256,uint256)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_with_best_rate(address,address,uint256,uint256,address)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256,address)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "get_best_rate(address,address,uint256)"(_from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_best_rate(address,address,uint256,address[8])"(_from: string, _to: string, _amount: BigNumberish, _exclude_pools: string[], overrides?: CallOverrides): Promise; + get_exchange_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_input_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_exchange_amounts(_pool: string, _from: string, _to: string, _amounts: BigNumberish[], overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise; + get_calculator(_pool: string, overrides?: CallOverrides): Promise; + update_registry_address(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_calculator(_pool: string, _calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_default_calculator(_calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_balance(_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + factory_registry(overrides?: CallOverrides): Promise; + crypto_registry(overrides?: CallOverrides): Promise; + default_calculator(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + "exchange_with_best_rate(address,address,uint256,uint256)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_with_best_rate(address,address,uint256,uint256,address)"(_from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange(address,address,address,uint256,uint256,address)"(_pool: string, _from: string, _to: string, _amount: BigNumberish, _expected: BigNumberish, _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "exchange_multiple(address[9],uint256[3][4],uint256,uint256,address[4],address)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _expected: BigNumberish, _pools: [string, string, string, string], _receiver: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + "get_best_rate(address,address,uint256)"(_from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_best_rate(address,address,uint256,address[8])"(_from: string, _to: string, _amount: BigNumberish, _exclude_pools: string[], overrides?: CallOverrides): Promise; + get_exchange_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_input_amount(_pool: string, _from: string, _to: string, _amount: BigNumberish, overrides?: CallOverrides): Promise; + get_exchange_amounts(_pool: string, _from: string, _to: string, _amounts: BigNumberish[], overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, overrides?: CallOverrides): Promise; + "get_exchange_multiple_amount(address[9],uint256[3][4],uint256,address[4])"(_route: string[], _swap_params: [ + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ], + [ + BigNumberish, + BigNumberish, + BigNumberish + ] + ], _amount: BigNumberish, _pools: [string, string, string, string], overrides?: CallOverrides): Promise; + get_calculator(_pool: string, overrides?: CallOverrides): Promise; + update_registry_address(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_calculator(_pool: string, _calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_default_calculator(_calculator: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claim_balance(_token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + set_killed(_is_killed: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + factory_registry(overrides?: CallOverrides): Promise; + crypto_registry(overrides?: CallOverrides): Promise; + default_calculator(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + }; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/CurveRegistrySwaps.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.d.ts new file mode 100644 index 0000000..0bbb0e0 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.d.ts @@ -0,0 +1,21 @@ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; +export interface TypedEvent = any, TArgsObject = any> extends Event { + args: TArgsArray & TArgsObject; +} +export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { +} +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} +declare type __TypechainArgsArray = T extends TypedEvent ? U : never; +export interface OnEvent { + (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + (eventName: string, listener: Listener): TRes; +} +export declare type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; +export declare type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; +export declare type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/common.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.d.ts new file mode 100644 index 0000000..0eb6991 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.d.ts @@ -0,0 +1,49 @@ +import { Signer } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { CurveCryptoSwap2ETH, CurveCryptoSwap2ETHInterface } from "../CurveCryptoSwap2ETH"; +export declare class CurveCryptoSwap2ETH__factory { + static readonly abi: ({ + name: string; + inputs: { + name: string; + type: string; + indexed: boolean; + }[]; + anonymous: boolean; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + stateMutability: string; + type: string; + inputs: { + name: string; + type: string; + }[]; + outputs: never[]; + name?: undefined; + anonymous?: undefined; + } | { + stateMutability: string; + type: string; + name?: undefined; + inputs?: undefined; + anonymous?: undefined; + outputs?: undefined; + } | { + stateMutability: string; + type: string; + name: string; + inputs: { + name: string; + type: string; + }[]; + outputs: { + name: string; + type: string; + }[]; + anonymous?: undefined; + })[]; + static createInterface(): CurveCryptoSwap2ETHInterface; + static connect(address: string, signerOrProvider: Signer | Provider): CurveCryptoSwap2ETH; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.js new file mode 100644 index 0000000..2bf159a --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveCryptoSwap2ETH__factory.js @@ -0,0 +1,1517 @@ +"use strict"; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CurveCryptoSwap2ETH__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + name: "TokenExchange", + inputs: [ + { + name: "buyer", + type: "address", + indexed: true, + }, + { + name: "sold_id", + type: "uint256", + indexed: false, + }, + { + name: "tokens_sold", + type: "uint256", + indexed: false, + }, + { + name: "bought_id", + type: "uint256", + indexed: false, + }, + { + name: "tokens_bought", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "AddLiquidity", + inputs: [ + { + name: "provider", + type: "address", + indexed: true, + }, + { + name: "token_amounts", + type: "uint256[2]", + indexed: false, + }, + { + name: "fee", + type: "uint256", + indexed: false, + }, + { + name: "token_supply", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "RemoveLiquidity", + inputs: [ + { + name: "provider", + type: "address", + indexed: true, + }, + { + name: "token_amounts", + type: "uint256[2]", + indexed: false, + }, + { + name: "token_supply", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "RemoveLiquidityOne", + inputs: [ + { + name: "provider", + type: "address", + indexed: true, + }, + { + name: "token_amount", + type: "uint256", + indexed: false, + }, + { + name: "coin_index", + type: "uint256", + indexed: false, + }, + { + name: "coin_amount", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "CommitNewAdmin", + inputs: [ + { + name: "deadline", + type: "uint256", + indexed: true, + }, + { + name: "admin", + type: "address", + indexed: true, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "NewAdmin", + inputs: [ + { + name: "admin", + type: "address", + indexed: true, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "CommitNewParameters", + inputs: [ + { + name: "deadline", + type: "uint256", + indexed: true, + }, + { + name: "admin_fee", + type: "uint256", + indexed: false, + }, + { + name: "mid_fee", + type: "uint256", + indexed: false, + }, + { + name: "out_fee", + type: "uint256", + indexed: false, + }, + { + name: "fee_gamma", + type: "uint256", + indexed: false, + }, + { + name: "allowed_extra_profit", + type: "uint256", + indexed: false, + }, + { + name: "adjustment_step", + type: "uint256", + indexed: false, + }, + { + name: "ma_half_time", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "NewParameters", + inputs: [ + { + name: "admin_fee", + type: "uint256", + indexed: false, + }, + { + name: "mid_fee", + type: "uint256", + indexed: false, + }, + { + name: "out_fee", + type: "uint256", + indexed: false, + }, + { + name: "fee_gamma", + type: "uint256", + indexed: false, + }, + { + name: "allowed_extra_profit", + type: "uint256", + indexed: false, + }, + { + name: "adjustment_step", + type: "uint256", + indexed: false, + }, + { + name: "ma_half_time", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "RampAgamma", + inputs: [ + { + name: "initial_A", + type: "uint256", + indexed: false, + }, + { + name: "future_A", + type: "uint256", + indexed: false, + }, + { + name: "initial_gamma", + type: "uint256", + indexed: false, + }, + { + name: "future_gamma", + type: "uint256", + indexed: false, + }, + { + name: "initial_time", + type: "uint256", + indexed: false, + }, + { + name: "future_time", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "StopRampA", + inputs: [ + { + name: "current_A", + type: "uint256", + indexed: false, + }, + { + name: "current_gamma", + type: "uint256", + indexed: false, + }, + { + name: "time", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "ClaimAdminFee", + inputs: [ + { + name: "admin", + type: "address", + indexed: true, + }, + { + name: "tokens", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + stateMutability: "nonpayable", + type: "constructor", + inputs: [ + { + name: "owner", + type: "address", + }, + { + name: "admin_fee_receiver", + type: "address", + }, + { + name: "A", + type: "uint256", + }, + { + name: "gamma", + type: "uint256", + }, + { + name: "mid_fee", + type: "uint256", + }, + { + name: "out_fee", + type: "uint256", + }, + { + name: "allowed_extra_profit", + type: "uint256", + }, + { + name: "fee_gamma", + type: "uint256", + }, + { + name: "adjustment_step", + type: "uint256", + }, + { + name: "admin_fee", + type: "uint256", + }, + { + name: "ma_half_time", + type: "uint256", + }, + { + name: "initial_price", + type: "uint256", + }, + { + name: "_token", + type: "address", + }, + { + name: "_coins", + type: "address[2]", + }, + ], + outputs: [], + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "view", + type: "function", + name: "token", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "coins", + inputs: [ + { + name: "i", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "A", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "gamma", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "get_virtual_price", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "price_oracle", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + { + name: "receiver", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange_underlying", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange_underlying", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + { + name: "receiver", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "exchange_extended", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + { + name: "min_dy", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + { + name: "sender", + type: "address", + }, + { + name: "receiver", + type: "address", + }, + { + name: "cb", + type: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "get_dy", + inputs: [ + { + name: "i", + type: "uint256", + }, + { + name: "j", + type: "uint256", + }, + { + name: "dx", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "add_liquidity", + inputs: [ + { + name: "amounts", + type: "uint256[2]", + }, + { + name: "min_mint_amount", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "add_liquidity", + inputs: [ + { + name: "amounts", + type: "uint256[2]", + }, + { + name: "min_mint_amount", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "payable", + type: "function", + name: "add_liquidity", + inputs: [ + { + name: "amounts", + type: "uint256[2]", + }, + { + name: "min_mint_amount", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + { + name: "receiver", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity", + inputs: [ + { + name: "_amount", + type: "uint256", + }, + { + name: "min_amounts", + type: "uint256[2]", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity", + inputs: [ + { + name: "_amount", + type: "uint256", + }, + { + name: "min_amounts", + type: "uint256[2]", + }, + { + name: "use_eth", + type: "bool", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity", + inputs: [ + { + name: "_amount", + type: "uint256", + }, + { + name: "min_amounts", + type: "uint256[2]", + }, + { + name: "use_eth", + type: "bool", + }, + { + name: "receiver", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "view", + type: "function", + name: "calc_token_amount", + inputs: [ + { + name: "amounts", + type: "uint256[2]", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "calc_withdraw_one_coin", + inputs: [ + { + name: "token_amount", + type: "uint256", + }, + { + name: "i", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity_one_coin", + inputs: [ + { + name: "token_amount", + type: "uint256", + }, + { + name: "i", + type: "uint256", + }, + { + name: "min_amount", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity_one_coin", + inputs: [ + { + name: "token_amount", + type: "uint256", + }, + { + name: "i", + type: "uint256", + }, + { + name: "min_amount", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "remove_liquidity_one_coin", + inputs: [ + { + name: "token_amount", + type: "uint256", + }, + { + name: "i", + type: "uint256", + }, + { + name: "min_amount", + type: "uint256", + }, + { + name: "use_eth", + type: "bool", + }, + { + name: "receiver", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "claim_admin_fees", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "ramp_A_gamma", + inputs: [ + { + name: "future_A", + type: "uint256", + }, + { + name: "future_gamma", + type: "uint256", + }, + { + name: "future_time", + type: "uint256", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "stop_ramp_A_gamma", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "commit_new_parameters", + inputs: [ + { + name: "_new_mid_fee", + type: "uint256", + }, + { + name: "_new_out_fee", + type: "uint256", + }, + { + name: "_new_admin_fee", + type: "uint256", + }, + { + name: "_new_fee_gamma", + type: "uint256", + }, + { + name: "_new_allowed_extra_profit", + type: "uint256", + }, + { + name: "_new_adjustment_step", + type: "uint256", + }, + { + name: "_new_ma_half_time", + type: "uint256", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "apply_new_parameters", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "revert_new_parameters", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "commit_transfer_ownership", + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "apply_transfer_ownership", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "revert_transfer_ownership", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "kill_me", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "unkill_me", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "set_admin_fee_receiver", + inputs: [ + { + name: "_admin_fee_receiver", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "view", + type: "function", + name: "lp_price", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "price_scale", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "last_prices", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "last_prices_timestamp", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "initial_A_gamma", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_A_gamma", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "initial_A_gamma_time", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_A_gamma_time", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "allowed_extra_profit", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_allowed_extra_profit", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "fee_gamma", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_fee_gamma", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "adjustment_step", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_adjustment_step", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "ma_half_time", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_ma_half_time", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "mid_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "out_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "admin_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_mid_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_out_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_admin_fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "balances", + inputs: [ + { + name: "arg0", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "D", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "xcp_profit", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "xcp_profit_a", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "virtual_price", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "is_killed", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "kill_deadline", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "transfer_ownership_deadline", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "admin_actions_deadline", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "admin_fee_receiver", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, +]; +class CurveCryptoSwap2ETH__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.CurveCryptoSwap2ETH__factory = CurveCryptoSwap2ETH__factory; +CurveCryptoSwap2ETH__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.d.ts new file mode 100644 index 0000000..0b29980 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.d.ts @@ -0,0 +1,56 @@ +import { Signer } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { CurveLiquidityGaugeV5, CurveLiquidityGaugeV5Interface } from "../CurveLiquidityGaugeV5"; +export declare class CurveLiquidityGaugeV5__factory { + static readonly abi: ({ + name: string; + inputs: { + name: string; + type: string; + indexed: boolean; + }[]; + anonymous: boolean; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + stateMutability: string; + type: string; + inputs: never[]; + outputs: never[]; + name?: undefined; + anonymous?: undefined; + } | { + stateMutability: string; + type: string; + name: string; + inputs: { + name: string; + type: string; + }[]; + outputs: { + name: string; + type: string; + }[]; + anonymous?: undefined; + } | { + stateMutability: string; + type: string; + name: string; + inputs: { + name: string; + type: string; + }[]; + outputs: { + name: string; + type: string; + components: { + name: string; + type: string; + }[]; + }[]; + anonymous?: undefined; + })[]; + static createInterface(): CurveLiquidityGaugeV5Interface; + static connect(address: string, signerOrProvider: Signer | Provider): CurveLiquidityGaugeV5; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.js new file mode 100644 index 0000000..85f7b8a --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveLiquidityGaugeV5__factory.js @@ -0,0 +1,1027 @@ +"use strict"; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CurveLiquidityGaugeV5__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + name: "Deposit", + inputs: [ + { + name: "provider", + type: "address", + indexed: true, + }, + { + name: "value", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "Withdraw", + inputs: [ + { + name: "provider", + type: "address", + indexed: true, + }, + { + name: "value", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "UpdateLiquidityLimit", + inputs: [ + { + name: "user", + type: "address", + indexed: true, + }, + { + name: "original_balance", + type: "uint256", + indexed: false, + }, + { + name: "original_supply", + type: "uint256", + indexed: false, + }, + { + name: "working_balance", + type: "uint256", + indexed: false, + }, + { + name: "working_supply", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "CommitOwnership", + inputs: [ + { + name: "admin", + type: "address", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "ApplyOwnership", + inputs: [ + { + name: "admin", + type: "address", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "Transfer", + inputs: [ + { + name: "_from", + type: "address", + indexed: true, + }, + { + name: "_to", + type: "address", + indexed: true, + }, + { + name: "_value", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + name: "Approval", + inputs: [ + { + name: "_owner", + type: "address", + indexed: true, + }, + { + name: "_spender", + type: "address", + indexed: true, + }, + { + name: "_value", + type: "uint256", + indexed: false, + }, + ], + anonymous: false, + type: "event", + }, + { + stateMutability: "nonpayable", + type: "constructor", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "deposit", + inputs: [ + { + name: "_value", + type: "uint256", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "deposit", + inputs: [ + { + name: "_value", + type: "uint256", + }, + { + name: "_addr", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "deposit", + inputs: [ + { + name: "_value", + type: "uint256", + }, + { + name: "_addr", + type: "address", + }, + { + name: "_claim_rewards", + type: "bool", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "withdraw", + inputs: [ + { + name: "_value", + type: "uint256", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "withdraw", + inputs: [ + { + name: "_value", + type: "uint256", + }, + { + name: "_claim_rewards", + type: "bool", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "claim_rewards", + inputs: [], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "claim_rewards", + inputs: [ + { + name: "_addr", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "claim_rewards", + inputs: [ + { + name: "_addr", + type: "address", + }, + { + name: "_receiver", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "transferFrom", + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "transfer", + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "approve", + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "permit", + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + { + name: "_deadline", + type: "uint256", + }, + { + name: "_v", + type: "uint8", + }, + { + name: "_r", + type: "bytes32", + }, + { + name: "_s", + type: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "increaseAllowance", + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_added_value", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "decreaseAllowance", + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_subtracted_value", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "user_checkpoint", + inputs: [ + { + name: "addr", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "set_rewards_receiver", + inputs: [ + { + name: "_receiver", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "kick", + inputs: [ + { + name: "addr", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "deposit_reward_token", + inputs: [ + { + name: "_reward_token", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "add_reward", + inputs: [ + { + name: "_reward_token", + type: "address", + }, + { + name: "_distributor", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "set_reward_distributor", + inputs: [ + { + name: "_reward_token", + type: "address", + }, + { + name: "_distributor", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "set_killed", + inputs: [ + { + name: "_is_killed", + type: "bool", + }, + ], + outputs: [], + }, + { + stateMutability: "view", + type: "function", + name: "claimed_reward", + inputs: [ + { + name: "_addr", + type: "address", + }, + { + name: "_token", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "claimable_reward", + inputs: [ + { + name: "_user", + type: "address", + }, + { + name: "_reward_token", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "claimable_tokens", + inputs: [ + { + name: "addr", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "integrate_checkpoint", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "future_epoch_time", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "inflation_rate", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "string", + }, + ], + }, + { + stateMutability: "nonpayable", + type: "function", + name: "initialize", + inputs: [ + { + name: "_lp_token", + type: "address", + }, + ], + outputs: [], + }, + { + stateMutability: "view", + type: "function", + name: "balanceOf", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "allowance", + inputs: [ + { + name: "arg0", + type: "address", + }, + { + name: "arg1", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "nonces", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "factory", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "lp_token", + inputs: [], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "is_killed", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "reward_count", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "reward_data", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + components: [ + { + name: "token", + type: "address", + }, + { + name: "distributor", + type: "address", + }, + { + name: "period_finish", + type: "uint256", + }, + { + name: "rate", + type: "uint256", + }, + { + name: "last_update", + type: "uint256", + }, + { + name: "integral", + type: "uint256", + }, + ], + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "rewards_receiver", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "reward_integral_for", + inputs: [ + { + name: "arg0", + type: "address", + }, + { + name: "arg1", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "working_balances", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "working_supply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "integrate_inv_supply_of", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "integrate_checkpoint_of", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "integrate_fraction", + inputs: [ + { + name: "arg0", + type: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "period", + inputs: [], + outputs: [ + { + name: "", + type: "int128", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "reward_tokens", + inputs: [ + { + name: "arg0", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "address", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "period_timestamp", + inputs: [ + { + name: "arg0", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, + { + stateMutability: "view", + type: "function", + name: "integrate_inv_supply", + inputs: [ + { + name: "arg0", + type: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + }, + ], + }, +]; +class CurveLiquidityGaugeV5__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.CurveLiquidityGaugeV5__factory = CurveLiquidityGaugeV5__factory; +CurveLiquidityGaugeV5__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.d.ts new file mode 100644 index 0000000..d673306 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.d.ts @@ -0,0 +1,49 @@ +import { Signer } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { CurveRegistrySwaps, CurveRegistrySwapsInterface } from "../CurveRegistrySwaps"; +export declare class CurveRegistrySwaps__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + name: string; + type: string; + }[]; + outputs: never[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + } | { + stateMutability: string; + type: string; + anonymous?: undefined; + inputs?: undefined; + name?: undefined; + outputs?: undefined; + } | { + inputs: { + name: string; + type: string; + }[]; + name: string; + outputs: { + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): CurveRegistrySwapsInterface; + static connect(address: string, signerOrProvider: Signer | Provider): CurveRegistrySwaps; +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.js new file mode 100644 index 0000000..3584726 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/CurveRegistrySwaps__factory.js @@ -0,0 +1,675 @@ +"use strict"; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CurveRegistrySwaps__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "buyer", + type: "address", + }, + { + indexed: true, + name: "receiver", + type: "address", + }, + { + indexed: true, + name: "pool", + type: "address", + }, + { + indexed: false, + name: "token_sold", + type: "address", + }, + { + indexed: false, + name: "token_bought", + type: "address", + }, + { + indexed: false, + name: "amount_sold", + type: "uint256", + }, + { + indexed: false, + name: "amount_bought", + type: "uint256", + }, + ], + name: "TokenExchange", + type: "event", + }, + { + inputs: [ + { + name: "_address_provider", + type: "address", + }, + { + name: "_calculator", + type: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + ], + name: "exchange_with_best_rate", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + { + name: "_receiver", + type: "address", + }, + ], + name: "exchange_with_best_rate", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + ], + name: "exchange", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + { + name: "_receiver", + type: "address", + }, + ], + name: "exchange", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_route", + type: "address[9]", + }, + { + name: "_swap_params", + type: "uint256[3][4]", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + ], + name: "exchange_multiple", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_route", + type: "address[9]", + }, + { + name: "_swap_params", + type: "uint256[3][4]", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + { + name: "_pools", + type: "address[4]", + }, + ], + name: "exchange_multiple", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_route", + type: "address[9]", + }, + { + name: "_swap_params", + type: "uint256[3][4]", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_expected", + type: "uint256", + }, + { + name: "_pools", + type: "address[4]", + }, + { + name: "_receiver", + type: "address", + }, + ], + name: "exchange_multiple", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "get_best_rate", + outputs: [ + { + name: "", + type: "address", + }, + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_exclude_pools", + type: "address[8]", + }, + ], + name: "get_best_rate", + outputs: [ + { + name: "", + type: "address", + }, + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "get_exchange_amount", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "get_input_amount", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_amounts", + type: "uint256[100]", + }, + ], + name: "get_exchange_amounts", + outputs: [ + { + name: "", + type: "uint256[100]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_route", + type: "address[9]", + }, + { + name: "_swap_params", + type: "uint256[3][4]", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "get_exchange_multiple_amount", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_route", + type: "address[9]", + }, + { + name: "_swap_params", + type: "uint256[3][4]", + }, + { + name: "_amount", + type: "uint256", + }, + { + name: "_pools", + type: "address[4]", + }, + ], + name: "get_exchange_multiple_amount", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + ], + name: "get_calculator", + outputs: [ + { + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "update_registry_address", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + name: "_pool", + type: "address", + }, + { + name: "_calculator", + type: "address", + }, + ], + name: "set_calculator", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + name: "_calculator", + type: "address", + }, + ], + name: "set_default_calculator", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + name: "_token", + type: "address", + }, + ], + name: "claim_balance", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + name: "_is_killed", + type: "bool", + }, + ], + name: "set_killed", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "factory_registry", + outputs: [ + { + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "crypto_registry", + outputs: [ + { + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "default_calculator", + outputs: [ + { + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "is_killed", + outputs: [ + { + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class CurveRegistrySwaps__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.CurveRegistrySwaps__factory = CurveRegistrySwaps__factory; +CurveRegistrySwaps__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.d.ts new file mode 100644 index 0000000..4c55215 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.d.ts @@ -0,0 +1,3 @@ +export { CurveCryptoSwap2ETH__factory } from "./CurveCryptoSwap2ETH__factory"; +export { CurveLiquidityGaugeV5__factory } from "./CurveLiquidityGaugeV5__factory"; +export { CurveRegistrySwaps__factory } from "./CurveRegistrySwaps__factory"; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.js new file mode 100644 index 0000000..ccdb21b --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/factories/index.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CurveRegistrySwaps__factory = exports.CurveLiquidityGaugeV5__factory = exports.CurveCryptoSwap2ETH__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +var CurveCryptoSwap2ETH__factory_1 = require("./CurveCryptoSwap2ETH__factory"); +Object.defineProperty(exports, "CurveCryptoSwap2ETH__factory", { enumerable: true, get: function () { return CurveCryptoSwap2ETH__factory_1.CurveCryptoSwap2ETH__factory; } }); +var CurveLiquidityGaugeV5__factory_1 = require("./CurveLiquidityGaugeV5__factory"); +Object.defineProperty(exports, "CurveLiquidityGaugeV5__factory", { enumerable: true, get: function () { return CurveLiquidityGaugeV5__factory_1.CurveLiquidityGaugeV5__factory; } }); +var CurveRegistrySwaps__factory_1 = require("./CurveRegistrySwaps__factory"); +Object.defineProperty(exports, "CurveRegistrySwaps__factory", { enumerable: true, get: function () { return CurveRegistrySwaps__factory_1.CurveRegistrySwaps__factory; } }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.d.ts new file mode 100644 index 0000000..2b66626 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.d.ts @@ -0,0 +1,7 @@ +export type { CurveCryptoSwap2ETH } from "./CurveCryptoSwap2ETH"; +export type { CurveLiquidityGaugeV5 } from "./CurveLiquidityGaugeV5"; +export type { CurveRegistrySwaps } from "./CurveRegistrySwaps"; +export * as factories from "./factories"; +export { CurveLiquidityGaugeV5__factory } from "./factories/CurveLiquidityGaugeV5__factory"; +export { CurveCryptoSwap2ETH__factory } from "./factories/CurveCryptoSwap2ETH__factory"; +export { CurveRegistrySwaps__factory } from "./factories/CurveRegistrySwaps__factory"; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.js new file mode 100644 index 0000000..229475e --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/external/index.js @@ -0,0 +1,33 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CurveRegistrySwaps__factory = exports.CurveCryptoSwap2ETH__factory = exports.CurveLiquidityGaugeV5__factory = exports.factories = void 0; +exports.factories = __importStar(require("./factories")); +var CurveLiquidityGaugeV5__factory_1 = require("./factories/CurveLiquidityGaugeV5__factory"); +Object.defineProperty(exports, "CurveLiquidityGaugeV5__factory", { enumerable: true, get: function () { return CurveLiquidityGaugeV5__factory_1.CurveLiquidityGaugeV5__factory; } }); +var CurveCryptoSwap2ETH__factory_1 = require("./factories/CurveCryptoSwap2ETH__factory"); +Object.defineProperty(exports, "CurveCryptoSwap2ETH__factory", { enumerable: true, get: function () { return CurveCryptoSwap2ETH__factory_1.CurveCryptoSwap2ETH__factory; } }); +var CurveRegistrySwaps__factory_1 = require("./factories/CurveRegistrySwaps__factory"); +Object.defineProperty(exports, "CurveRegistrySwaps__factory", { enumerable: true, get: function () { return CurveRegistrySwaps__factory_1.CurveRegistrySwaps__factory; } }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.d.ts new file mode 100644 index 0000000..3e268a2 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.d.ts @@ -0,0 +1,34 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { BLUSDLPZap, BLUSDLPZapInterface } from "../BLUSDLPZap"; +declare type BLUSDLPZapConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class BLUSDLPZap__factory extends ContractFactory { + constructor(...args: BLUSDLPZapConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): BLUSDLPZap; + connect(signer: Signer): BLUSDLPZap__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b50611640806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063633c37c31161008c578063bccb587011610066578063bccb5870146101f1578063c2c00fda1461020c578063eb152e6e14610227578063ef6f658c1461023a57600080fd5b8063633c37c3146101b0578063846d22c0146101c3578063b83f91a2146101d657600080fd5b80633b567faa116100bd5780633b567faa146101525780633c73baa414610167578063422f10431461018f57600080fd5b806326064dd8146100e45780632746b7f81461011c5780633792dcb914610137575b600080fd5b6100ff73da0dd1798be66e17d5ab1dc476302b56689c2db481565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ff73ed279fdd11ca84beef15af5d39bb4d4bee23f0ca81565b6100ff73b9d7dddca9a4ac480991865efef82e01273f79c381565b610165610160366004611419565b61024d565b005b61017a610175366004611445565b6106b1565b60408051928352602083019190915201610113565b6101a261019d366004611419565b61093a565b604051908152602001610113565b6101a26101be366004611445565b610950565b6101a26101d136600461145e565b610a55565b6100ff735f98805a4e8be255a32880fdec7f6728c6568ba081565b6100ff7374ed5d42203806c8cdcf2f04ca5f60dc777b901c81565b6100ff735ca0313d44551e32e0d7a298ec024321c4bc59b481565b6101a2610235366004611419565b610c1c565b61016561024836600461145e565b610d37565b6040516323b872dd60e01b815233600482015230602482015260448101849052735ca0313d44551e32e0d7a298ec024321c4bc59b4906323b872dd906064016020604051808303816000875af11580156102ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cf9190611480565b506040516370a0823160e01b815230600482015260009073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa158015610322573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034691906114a2565b6040516370a0823160e01b815230600482015290915060009073b9d7dddca9a4ac480991865efef82e01273f79c3906370a0823190602401602060405180830381865afa15801561039b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bf91906114a2565b6040805180820182528681526000602082018190529151630c04742560e11b81529293507374ed5d42203806c8cdcf2f04ca5f60dc777b901c92631808e84a92610412928a9290919030906004016114e4565b600060405180830381600087803b15801561042c57600080fd5b505af1158015610440573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925083915073b9d7dddca9a4ac480991865efef82e01273f79c3906370a0823190602401602060405180830381865afa158015610498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc91906114a2565b6104c6919061152e565b6040516370a0823160e01b8152306004820152909150600090849073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa15801561051d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054191906114a2565b61054b919061152e565b905080156105d15760405163081579a560e01b815260048101829052600060248201526044810186905233606482015273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063081579a590608401600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050610624565b84156106245760405162461bcd60e51b815260206004820152601b60248201527f4d696e204c55534420616d6f756e74206e6f742072656163686564000000000060448201526064015b60405180910390fd5b81156106a85760405163a9059cbb60e01b81523360048201526024810183905273b9d7dddca9a4ac480991865efef82e01273f79c39063a9059cbb906044016020604051808303816000875af1158015610682573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a69190611480565b505b50505050505050565b600080735ca0313d44551e32e0d7a298ec024321c4bc59b46001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a91906114a2565b604051634903b0d160e01b8152600060048201527374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634903b0d190602401602060405180830381865afa15801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e91906114a2565b6107a89085611541565b6107b29190611560565b91506000735ca0313d44551e32e0d7a298ec024321c4bc59b46001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082c91906114a2565b604051634903b0d160e01b8152600160048201527374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634903b0d190602401602060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a091906114a2565b6108aa9086611541565b6108b49190611560565b60405163cc2b27d760e01b8152600481018290526000602482015290915073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063cc2b27d790604401602060405180830381865afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093291906114a2565b915050915091565b600061094884848433610fb3565b949350505050565b6040516327d8462f60e11b8152600481018290526001602482015260009081907374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634fb08c5e90604401602060405180830381865afa1580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d091906114a2565b60405163cc2b27d760e01b8152600481018290526000602482015290915073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063cc2b27d790604401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e91906114a2565b9392505050565b6000808215610b895760408051808201825284815260006020820152905163ed8e84f360e01b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9163ed8e84f391610aa99190600190600401611582565b602060405180830381865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea91906114a2565b90506402540be40073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca6001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906114a2565b610b729083611541565b610b7c9190611560565b610b86908261152e565b90505b604080518082018252858152602081018390529051638d8ea72760e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c91638d8ea72791610bd1919060040161159f565b602060405180830381865afa158015610bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1291906114a2565b9150505b92915050565b6000610c2a84848430610fb3565b60405163095ea7b360e01b815273da0dd1798be66e17d5ab1dc476302b56689c2db4600482015260248101829052909150735ca0313d44551e32e0d7a298ec024321c4bc59b49063095ea7b3906044016020604051808303816000875af1158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190611480565b506040516383df674760e01b8152600481018290523360248201526000604482015273da0dd1798be66e17d5ab1dc476302b56689c2db4906383df674790606401600060405180830381600087803b158015610d1857600080fd5b505af1158015610d2c573d6000803e3d6000fd5b505050509392505050565b6040516323b872dd60e01b815233600482015230602482015260448101839052735ca0313d44551e32e0d7a298ec024321c4bc59b4906323b872dd906064016020604051808303816000875af1158015610d95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db99190611480565b506040516370a0823160e01b815230600482015260009073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3091906114a2565b6040516307329bcd60e01b8152600481018590526001602482015260006044820181905260648201523060848201529091507374ed5d42203806c8cdcf2f04ca5f60dc777b901c906307329bcd9060a401600060405180830381600087803b158015610e9b57600080fd5b505af1158015610eaf573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca925063081579a59150839083906370a0823190602401602060405180830381865afa158015610f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3091906114a2565b610f3a919061152e565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091526000602482015260448101859052336064820152608401600060405180830381600087803b158015610f9f57600080fd5b505af11580156106a8573d6000803e3d6000fd5b600080851180610fc35750600084115b6110215760405162461bcd60e51b815260206004820152602960248201527f424c5553444c505a61703a2043616e6e6f742070726f76696465207a65726f206044820152686c697175696469747960b81b606482015260840161061b565b600084156111d1576040516323b872dd60e01b815233600482015230602482015260448101869052735f98805a4e8be255a32880fdec7f6728c6568ba0906323b872dd906064016020604051808303816000875af1158015611087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ab9190611480565b5060405163095ea7b360e01b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca600482015260248101869052735f98805a4e8be255a32880fdec7f6728c6568ba09063095ea7b3906044016020604051808303816000875af1158015611118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113c9190611480565b50604080518082018252868152600060208201819052915163030f92d560e21b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca92630c3e4b549261118b9290919030906004016115ad565b6020604051808303816000875af11580156111aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ce91906114a2565b90505b6040516323b872dd60e01b81523360048201523060248201526044810187905273b9d7dddca9a4ac480991865efef82e01273f79c3906323b872dd906064016020604051808303816000875af115801561122f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112539190611480565b5060405163095ea7b360e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c60048201526024810187905273b9d7dddca9a4ac480991865efef82e01273f79c39063095ea7b3906044016020604051808303816000875af11580156112c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e49190611480565b50801561137d5760405163095ea7b360e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c60048201526024810182905273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063095ea7b3906044016020604051808303816000875af1158015611357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137b9190611480565b505b604080518082018252878152602081018390529051637328333b60e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c91637328333b916113cc9190889060009089906004016115d8565b6020604051808303816000875af11580156113eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140f91906114a2565b9695505050505050565b60008060006060848603121561142e57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561145757600080fd5b5035919050565b6000806040838503121561147157600080fd5b50508035926020909101359150565b60006020828403121561149257600080fd5b81518015158114610a4e57600080fd5b6000602082840312156114b457600080fd5b5051919050565b8060005b60028110156114de5781518452602093840193909101906001016114bf565b50505050565b84815260a081016114f860208301866114bb565b83151560608301526001600160a01b038316608083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c1657610c16611518565b600081600019048311821515161561155b5761155b611518565b500290565b60008261157d57634e487b7160e01b600052601260045260246000fd5b500490565b6060810161159082856114bb565b82151560408301529392505050565b60408101610c1682846114bb565b608081016115bb82866114bb565b8360408301526001600160a01b0383166060830152949350505050565b60a081016115e682876114bb565b604082019490945291151560608301526001600160a01b031660809091015291905056fea26469706673582212203fc1a4ae62dd5878755d9c510080db570adbe014715297c1b083fe2dda8cf65264736f6c63430008100033"; + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): BLUSDLPZapInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BLUSDLPZap; +} +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.js new file mode 100644 index 0000000..a68b38f --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDLPZap__factory.js @@ -0,0 +1,286 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BLUSDLPZap__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "_bLUSDAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_lusdAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLPTokens", + type: "uint256", + }, + ], + name: "addLiquidity", + outputs: [ + { + internalType: "uint256", + name: "bLUSDLUSD3CRVTokens", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bLUSDAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_lusdAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLPTokens", + type: "uint256", + }, + ], + name: "addLiquidityAndStake", + outputs: [ + { + internalType: "uint256", + name: "bLUSDLUSD3CRVTokens", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "bLUSDGauge", + outputs: [ + { + internalType: "contract ICurveLiquidityGaugeV5", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bLUSDLUSD3CRVLPToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bLUSDLUSD3CRVPool", + outputs: [ + { + internalType: "contract ICurveCryptoPool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bLUSDToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bLUSDAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_lusdAmount", + type: "uint256", + }, + ], + name: "getMinLPTokens", + outputs: [ + { + internalType: "uint256", + name: "bLUSDLUSD3CRVTokens", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lpAmount", + type: "uint256", + }, + ], + name: "getMinWithdrawBalanced", + outputs: [ + { + internalType: "uint256", + name: "bLUSDAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lusdAmount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lpAmount", + type: "uint256", + }, + ], + name: "getMinWithdrawLUSD", + outputs: [ + { + internalType: "uint256", + name: "lusdAmount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lusd3CRVPool", + outputs: [ + { + internalType: "contract ICurvePool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lusdToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lpAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minBLUSD", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLUSD", + type: "uint256", + }, + ], + name: "removeLiquidityBalanced", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lpAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLUSD", + type: "uint256", + }, + ], + name: "removeLiquidityLUSD", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b50611640806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063633c37c31161008c578063bccb587011610066578063bccb5870146101f1578063c2c00fda1461020c578063eb152e6e14610227578063ef6f658c1461023a57600080fd5b8063633c37c3146101b0578063846d22c0146101c3578063b83f91a2146101d657600080fd5b80633b567faa116100bd5780633b567faa146101525780633c73baa414610167578063422f10431461018f57600080fd5b806326064dd8146100e45780632746b7f81461011c5780633792dcb914610137575b600080fd5b6100ff73da0dd1798be66e17d5ab1dc476302b56689c2db481565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ff73ed279fdd11ca84beef15af5d39bb4d4bee23f0ca81565b6100ff73b9d7dddca9a4ac480991865efef82e01273f79c381565b610165610160366004611419565b61024d565b005b61017a610175366004611445565b6106b1565b60408051928352602083019190915201610113565b6101a261019d366004611419565b61093a565b604051908152602001610113565b6101a26101be366004611445565b610950565b6101a26101d136600461145e565b610a55565b6100ff735f98805a4e8be255a32880fdec7f6728c6568ba081565b6100ff7374ed5d42203806c8cdcf2f04ca5f60dc777b901c81565b6100ff735ca0313d44551e32e0d7a298ec024321c4bc59b481565b6101a2610235366004611419565b610c1c565b61016561024836600461145e565b610d37565b6040516323b872dd60e01b815233600482015230602482015260448101849052735ca0313d44551e32e0d7a298ec024321c4bc59b4906323b872dd906064016020604051808303816000875af11580156102ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cf9190611480565b506040516370a0823160e01b815230600482015260009073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa158015610322573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034691906114a2565b6040516370a0823160e01b815230600482015290915060009073b9d7dddca9a4ac480991865efef82e01273f79c3906370a0823190602401602060405180830381865afa15801561039b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bf91906114a2565b6040805180820182528681526000602082018190529151630c04742560e11b81529293507374ed5d42203806c8cdcf2f04ca5f60dc777b901c92631808e84a92610412928a9290919030906004016114e4565b600060405180830381600087803b15801561042c57600080fd5b505af1158015610440573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925083915073b9d7dddca9a4ac480991865efef82e01273f79c3906370a0823190602401602060405180830381865afa158015610498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc91906114a2565b6104c6919061152e565b6040516370a0823160e01b8152306004820152909150600090849073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa15801561051d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054191906114a2565b61054b919061152e565b905080156105d15760405163081579a560e01b815260048101829052600060248201526044810186905233606482015273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063081579a590608401600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b50505050610624565b84156106245760405162461bcd60e51b815260206004820152601b60248201527f4d696e204c55534420616d6f756e74206e6f742072656163686564000000000060448201526064015b60405180910390fd5b81156106a85760405163a9059cbb60e01b81523360048201526024810183905273b9d7dddca9a4ac480991865efef82e01273f79c39063a9059cbb906044016020604051808303816000875af1158015610682573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a69190611480565b505b50505050505050565b600080735ca0313d44551e32e0d7a298ec024321c4bc59b46001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a91906114a2565b604051634903b0d160e01b8152600060048201527374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634903b0d190602401602060405180830381865afa15801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e91906114a2565b6107a89085611541565b6107b29190611560565b91506000735ca0313d44551e32e0d7a298ec024321c4bc59b46001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082c91906114a2565b604051634903b0d160e01b8152600160048201527374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634903b0d190602401602060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a091906114a2565b6108aa9086611541565b6108b49190611560565b60405163cc2b27d760e01b8152600481018290526000602482015290915073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063cc2b27d790604401602060405180830381865afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093291906114a2565b915050915091565b600061094884848433610fb3565b949350505050565b6040516327d8462f60e11b8152600481018290526001602482015260009081907374ed5d42203806c8cdcf2f04ca5f60dc777b901c90634fb08c5e90604401602060405180830381865afa1580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d091906114a2565b60405163cc2b27d760e01b8152600481018290526000602482015290915073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063cc2b27d790604401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e91906114a2565b9392505050565b6000808215610b895760408051808201825284815260006020820152905163ed8e84f360e01b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9163ed8e84f391610aa99190600190600401611582565b602060405180830381865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea91906114a2565b90506402540be40073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca6001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906114a2565b610b729083611541565b610b7c9190611560565b610b86908261152e565b90505b604080518082018252858152602081018390529051638d8ea72760e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c91638d8ea72791610bd1919060040161159f565b602060405180830381865afa158015610bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1291906114a2565b9150505b92915050565b6000610c2a84848430610fb3565b60405163095ea7b360e01b815273da0dd1798be66e17d5ab1dc476302b56689c2db4600482015260248101829052909150735ca0313d44551e32e0d7a298ec024321c4bc59b49063095ea7b3906044016020604051808303816000875af1158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190611480565b506040516383df674760e01b8152600481018290523360248201526000604482015273da0dd1798be66e17d5ab1dc476302b56689c2db4906383df674790606401600060405180830381600087803b158015610d1857600080fd5b505af1158015610d2c573d6000803e3d6000fd5b505050509392505050565b6040516323b872dd60e01b815233600482015230602482015260448101839052735ca0313d44551e32e0d7a298ec024321c4bc59b4906323b872dd906064016020604051808303816000875af1158015610d95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db99190611480565b506040516370a0823160e01b815230600482015260009073ed279fdd11ca84beef15af5d39bb4d4bee23f0ca906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3091906114a2565b6040516307329bcd60e01b8152600481018590526001602482015260006044820181905260648201523060848201529091507374ed5d42203806c8cdcf2f04ca5f60dc777b901c906307329bcd9060a401600060405180830381600087803b158015610e9b57600080fd5b505af1158015610eaf573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca925063081579a59150839083906370a0823190602401602060405180830381865afa158015610f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3091906114a2565b610f3a919061152e565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091526000602482015260448101859052336064820152608401600060405180830381600087803b158015610f9f57600080fd5b505af11580156106a8573d6000803e3d6000fd5b600080851180610fc35750600084115b6110215760405162461bcd60e51b815260206004820152602960248201527f424c5553444c505a61703a2043616e6e6f742070726f76696465207a65726f206044820152686c697175696469747960b81b606482015260840161061b565b600084156111d1576040516323b872dd60e01b815233600482015230602482015260448101869052735f98805a4e8be255a32880fdec7f6728c6568ba0906323b872dd906064016020604051808303816000875af1158015611087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ab9190611480565b5060405163095ea7b360e01b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca600482015260248101869052735f98805a4e8be255a32880fdec7f6728c6568ba09063095ea7b3906044016020604051808303816000875af1158015611118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113c9190611480565b50604080518082018252868152600060208201819052915163030f92d560e21b815273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca92630c3e4b549261118b9290919030906004016115ad565b6020604051808303816000875af11580156111aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ce91906114a2565b90505b6040516323b872dd60e01b81523360048201523060248201526044810187905273b9d7dddca9a4ac480991865efef82e01273f79c3906323b872dd906064016020604051808303816000875af115801561122f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112539190611480565b5060405163095ea7b360e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c60048201526024810187905273b9d7dddca9a4ac480991865efef82e01273f79c39063095ea7b3906044016020604051808303816000875af11580156112c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e49190611480565b50801561137d5760405163095ea7b360e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c60048201526024810182905273ed279fdd11ca84beef15af5d39bb4d4bee23f0ca9063095ea7b3906044016020604051808303816000875af1158015611357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137b9190611480565b505b604080518082018252878152602081018390529051637328333b60e01b81527374ed5d42203806c8cdcf2f04ca5f60dc777b901c91637328333b916113cc9190889060009089906004016115d8565b6020604051808303816000875af11580156113eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140f91906114a2565b9695505050505050565b60008060006060848603121561142e57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561145757600080fd5b5035919050565b6000806040838503121561147157600080fd5b50508035926020909101359150565b60006020828403121561149257600080fd5b81518015158114610a4e57600080fd5b6000602082840312156114b457600080fd5b5051919050565b8060005b60028110156114de5781518452602093840193909101906001016114bf565b50505050565b84815260a081016114f860208301866114bb565b83151560608301526001600160a01b038316608083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c1657610c16611518565b600081600019048311821515161561155b5761155b611518565b500290565b60008261157d57634e487b7160e01b600052601260045260246000fd5b500490565b6060810161159082856114bb565b82151560408301529392505050565b60408101610c1682846114bb565b608081016115bb82866114bb565b8360408301526001600160a01b0383166060830152949350505050565b60a081016115e682876114bb565b604082019490945291151560608301526001600160a01b031660809091015291905056fea26469706673582212203fc1a4ae62dd5878755d9c510080db570adbe014715297c1b083fe2dda8cf65264736f6c63430008100033"; +const isSuperArgs = (xs) => xs.length > 1; +class BLUSDLPZap__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.BLUSDLPZap__factory = BLUSDLPZap__factory; +BLUSDLPZap__factory.bytecode = _bytecode; +BLUSDLPZap__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.d.ts new file mode 100644 index 0000000..e749bd6 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { BLUSDToken, BLUSDTokenInterface } from "../BLUSDToken"; +declare type BLUSDTokenConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class BLUSDToken__factory extends ContractFactory { + constructor(...args: BLUSDTokenConstructorParams); + deploy(name_: string, symbol_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(name_: string, symbol_: string, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): BLUSDToken; + connect(signer: Signer): BLUSDToken__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506040516200121938038062001219833981016040819052620000349162000193565b818160036200004483826200028c565b5060046200005382826200028c565b505050620000706200006a6200007860201b60201c565b6200007c565b505062000358565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000f657600080fd5b81516001600160401b0380821115620001135762000113620000ce565b604051601f8301601f19908116603f011681019082821181831017156200013e576200013e620000ce565b816040528381526020925086838588010111156200015b57600080fd5b600091505b838210156200017f578582018301518183018401529082019062000160565b600093810190920192909252949350505050565b60008060408385031215620001a757600080fd5b82516001600160401b0380821115620001bf57600080fd5b620001cd86838701620000e4565b93506020850151915080821115620001e457600080fd5b50620001f385828601620000e4565b9150509250929050565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000ce565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610eb180620003686000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806381d3c435116100a2578063a457c2d711610071578063a457c2d71461023c578063a9059cbb1461024f578063c6315aa014610262578063dd62ed3e14610275578063f2fde38b146102ae57600080fd5b806381d3c435146101e95780638da5cb5b146101fc57806395d89b41146102215780639dc29fac1461022957600080fd5b8063313ce567116100e9578063313ce56714610181578063395093511461019057806340c10f19146101a357806370a08231146101b8578063715018a6146101e157600080fd5b806306fdde031461011b578063095ea7b31461013957806318160ddd1461015c57806323b872dd1461016e575b600080fd5b6101236102c1565b6040516101309190610ce0565b60405180910390f35b61014c610147366004610d4a565b610353565b6040519015158152602001610130565b6002545b604051908152602001610130565b61014c61017c366004610d74565b61036d565b60405160128152602001610130565b61014c61019e366004610d4a565b610391565b6101b66101b1366004610d4a565b6103d0565b005b6101606101c6366004610db0565b6001600160a01b031660009081526020819052604090205490565b6101b66103e6565b6101b66101f7366004610db0565b610451565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610130565b6101236104de565b6101b6610237366004610d4a565b6104ed565b61014c61024a366004610d4a565b6104ff565b61014c61025d366004610d4a565b610591565b600654610209906001600160a01b031681565b610160610283366004610dd2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101b66102bc366004610db0565b61059f565b6060600380546102d090610e05565b80601f01602080910402602001604051908101604052809291908181526020018280546102fc90610e05565b80156103495780601f1061031e57610100808354040283529160200191610349565b820191906000526020600020905b81548152906001019060200180831161032c57829003601f168201915b5050505050905090565b600033610361818585610667565b60019150505b92915050565b60003361037b85828561078c565b61038685858561081e565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061036190829086906103cb908790610e55565b610667565b6103d86109ec565b6103e28282610a5c565b5050565b6005546001600160a01b031633146104455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61044f6000610b3b565b565b6005546001600160a01b031633146104ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556104db6103e6565b50565b6060600480546102d090610e05565b6104f56109ec565b6103e28282610b9a565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156105845760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161043c565b6103868286868403610667565b60003361036181858561081e565b6005546001600160a01b031633146105f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6001600160a01b03811661065e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161043c565b6104db81610b3b565b6001600160a01b0383166106c95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161043c565b6001600160a01b03821661072a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161043c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610818578181101561080b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161043c565b6108188484848403610667565b50505050565b6001600160a01b0383166108825760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043c565b6001600160a01b0382166108e45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043c565b6001600160a01b0383166000908152602081905260409020548181101561095c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161043c565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610993908490610e55565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109df91815260200190565b60405180910390a3610818565b6006546001600160a01b0316331461044f5760405162461bcd60e51b815260206004820152602d60248201527f424c555344546f6b656e3a2043616c6c6572206d75737420626520436869636b60448201526c32b72137b73226b0b730b3b2b960991b606482015260840161043c565b6001600160a01b038216610ab25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161043c565b8060026000828254610ac49190610e55565b90915550506001600160a01b03821660009081526020819052604081208054839290610af1908490610e55565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216610bfa5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161043c565b6001600160a01b03821660009081526020819052604090205481811015610c6e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161043c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c9d908490610e68565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161077f565b600060208083528351808285015260005b81811015610d0d57858101830151858201604001528201610cf1565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610d4557600080fd5b919050565b60008060408385031215610d5d57600080fd5b610d6683610d2e565b946020939093013593505050565b600080600060608486031215610d8957600080fd5b610d9284610d2e565b9250610da060208501610d2e565b9150604084013590509250925092565b600060208284031215610dc257600080fd5b610dcb82610d2e565b9392505050565b60008060408385031215610de557600080fd5b610dee83610d2e565b9150610dfc60208401610d2e565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561036757610367610e3f565b8181038181111561036757610367610e3f56fea26469706673582212207700ae617f7132a5b2bf9529fa7381704d0b8b1aafd1e84bc977a106cd6f9a6464736f6c63430008100033"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): BLUSDTokenInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BLUSDToken; +} +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.js new file mode 100644 index 0000000..c2b2621 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BLUSDToken__factory.js @@ -0,0 +1,442 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BLUSDToken__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_from", + type: "address", + }, + { + internalType: "uint256", + name: "_bLUSDAmount", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "chickenBondManagerAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "uint256", + name: "_bLUSDAmount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_chickenBondManagerAddress", + type: "address", + }, + ], + name: "setAddresses", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506040516200121938038062001219833981016040819052620000349162000193565b818160036200004483826200028c565b5060046200005382826200028c565b505050620000706200006a6200007860201b60201c565b6200007c565b505062000358565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000f657600080fd5b81516001600160401b0380821115620001135762000113620000ce565b604051601f8301601f19908116603f011681019082821181831017156200013e576200013e620000ce565b816040528381526020925086838588010111156200015b57600080fd5b600091505b838210156200017f578582018301518183018401529082019062000160565b600093810190920192909252949350505050565b60008060408385031215620001a757600080fd5b82516001600160401b0380821115620001bf57600080fd5b620001cd86838701620000e4565b93506020850151915080821115620001e457600080fd5b50620001f385828601620000e4565b9150509250929050565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000ce565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610eb180620003686000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806381d3c435116100a2578063a457c2d711610071578063a457c2d71461023c578063a9059cbb1461024f578063c6315aa014610262578063dd62ed3e14610275578063f2fde38b146102ae57600080fd5b806381d3c435146101e95780638da5cb5b146101fc57806395d89b41146102215780639dc29fac1461022957600080fd5b8063313ce567116100e9578063313ce56714610181578063395093511461019057806340c10f19146101a357806370a08231146101b8578063715018a6146101e157600080fd5b806306fdde031461011b578063095ea7b31461013957806318160ddd1461015c57806323b872dd1461016e575b600080fd5b6101236102c1565b6040516101309190610ce0565b60405180910390f35b61014c610147366004610d4a565b610353565b6040519015158152602001610130565b6002545b604051908152602001610130565b61014c61017c366004610d74565b61036d565b60405160128152602001610130565b61014c61019e366004610d4a565b610391565b6101b66101b1366004610d4a565b6103d0565b005b6101606101c6366004610db0565b6001600160a01b031660009081526020819052604090205490565b6101b66103e6565b6101b66101f7366004610db0565b610451565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610130565b6101236104de565b6101b6610237366004610d4a565b6104ed565b61014c61024a366004610d4a565b6104ff565b61014c61025d366004610d4a565b610591565b600654610209906001600160a01b031681565b610160610283366004610dd2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101b66102bc366004610db0565b61059f565b6060600380546102d090610e05565b80601f01602080910402602001604051908101604052809291908181526020018280546102fc90610e05565b80156103495780601f1061031e57610100808354040283529160200191610349565b820191906000526020600020905b81548152906001019060200180831161032c57829003601f168201915b5050505050905090565b600033610361818585610667565b60019150505b92915050565b60003361037b85828561078c565b61038685858561081e565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061036190829086906103cb908790610e55565b610667565b6103d86109ec565b6103e28282610a5c565b5050565b6005546001600160a01b031633146104455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61044f6000610b3b565b565b6005546001600160a01b031633146104ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556104db6103e6565b50565b6060600480546102d090610e05565b6104f56109ec565b6103e28282610b9a565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156105845760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161043c565b6103868286868403610667565b60003361036181858561081e565b6005546001600160a01b031633146105f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6001600160a01b03811661065e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161043c565b6104db81610b3b565b6001600160a01b0383166106c95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161043c565b6001600160a01b03821661072a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161043c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610818578181101561080b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161043c565b6108188484848403610667565b50505050565b6001600160a01b0383166108825760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043c565b6001600160a01b0382166108e45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043c565b6001600160a01b0383166000908152602081905260409020548181101561095c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161043c565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610993908490610e55565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109df91815260200190565b60405180910390a3610818565b6006546001600160a01b0316331461044f5760405162461bcd60e51b815260206004820152602d60248201527f424c555344546f6b656e3a2043616c6c6572206d75737420626520436869636b60448201526c32b72137b73226b0b730b3b2b960991b606482015260840161043c565b6001600160a01b038216610ab25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161043c565b8060026000828254610ac49190610e55565b90915550506001600160a01b03821660009081526020819052604081208054839290610af1908490610e55565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216610bfa5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161043c565b6001600160a01b03821660009081526020819052604090205481811015610c6e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161043c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c9d908490610e68565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161077f565b600060208083528351808285015260005b81811015610d0d57858101830151858201604001528201610cf1565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610d4557600080fd5b919050565b60008060408385031215610d5d57600080fd5b610d6683610d2e565b946020939093013593505050565b600080600060608486031215610d8957600080fd5b610d9284610d2e565b9250610da060208501610d2e565b9150604084013590509250925092565b600060208284031215610dc257600080fd5b610dcb82610d2e565b9392505050565b60008060408385031215610de557600080fd5b610dee83610d2e565b9150610dfc60208401610d2e565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561036757610367610e3f565b8181038181111561036757610367610e3f56fea26469706673582212207700ae617f7132a5b2bf9529fa7381704d0b8b1aafd1e84bc977a106cd6f9a6464736f6c63430008100033"; +const isSuperArgs = (xs) => xs.length > 1; +class BLUSDToken__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(name_, symbol_, overrides) { + return super.deploy(name_, symbol_, overrides || {}); + } + getDeployTransaction(name_, symbol_, overrides) { + return super.getDeployTransaction(name_, symbol_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.BLUSDToken__factory = BLUSDToken__factory; +BLUSDToken__factory.bytecode = _bytecode; +BLUSDToken__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.d.ts new file mode 100644 index 0000000..d19b9b1 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.d.ts @@ -0,0 +1,68 @@ +import { Signer, ContractFactory, BigNumberish, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { BondNFT, BondNFTInterface } from "../BondNFT"; +declare type BondNFTConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class BondNFT__factory extends ContractFactory { + constructor(...args: BondNFTConstructorParams); + deploy(name_: string, symbol_: string, _initialArtworkAddress: string, _transferLockoutPeriodSeconds: BigNumberish, _liquityDataAddresses: BondNFT.LiquityDataAddressesStruct, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(name_: string, symbol_: string, _initialArtworkAddress: string, _transferLockoutPeriodSeconds: BigNumberish, _liquityDataAddresses: BondNFT.LiquityDataAddressesStruct, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): BondNFT; + connect(signer: Signer): BondNFT__factory; + static readonly bytecode = "0x6101a06040523480156200001257600080fd5b5060405162003950380380620039508339810160408190526200003591620005dd565b84846000620000458382620007b4565b506001620000548282620007b4565b505050620000716200006b6200046860201b60201c565b6200046c565b80516001600160a01b0316620000e55760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a205f74726f76654d616e6167657241646472657373206d7560448201526d7374206265206e6f6e2d7a65726f60901b60648201526084015b60405180910390fd5b60208101516001600160a01b03166200014d5760405162461bcd60e51b8152602060048201526024808201527f426f6e644e46543a205f6c717479546f6b656e206d757374206265206e6f6e2d6044820152637a65726f60e01b6064820152608401620000dc565b60408101516001600160a01b0316620001b85760405162461bcd60e51b815260206004820152602660248201527f426f6e644e46543a205f6c7174795374616b696e67206d757374206265206e6f6044820152656e2d7a65726f60d01b6064820152608401620000dc565b60608101516001600160a01b0316620002255760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a205f7069636b6c654c5154594a6172206d757374206265206044820152676e6f6e2d7a65726f60c01b6064820152608401620000dc565b60808101516001600160a01b0316620002935760405162461bcd60e51b815260206004820152602960248201527f426f6e644e46543a205f7069636b6c654c5154594661726d206d757374206265604482015268206e6f6e2d7a65726f60b81b6064820152608401620000dc565b60a08101516001600160a01b0316620003075760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a205f63757276654761756765436f6e74726f6c6c6572206d60448201526e757374206265206e6f6e2d7a65726f60881b6064820152608401620000dc565b60c08101516001600160a01b0316620003795760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344334352564761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b60e08101516001600160a01b0316620003eb5760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344465241584761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b600c80546001600160a01b0319166001600160a01b03948516179055610180919091528051821660809081526020820151831660a09081526040830151841660c09081526060840151851660e090815292840151851661010052908301518416610120528201518316610140520151166101605250620008809050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715620004fa57620004fa620004be565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200052b576200052b620004be565b604052919050565b600082601f8301126200054557600080fd5b81516001600160401b03811115620005615762000561620004be565b602062000577601f8301601f1916820162000500565b82815285828487010111156200058c57600080fd5b60005b83811015620005ac5785810183015182820184015282016200058f565b506000928101909101919091529392505050565b80516001600160a01b0381168114620005d857600080fd5b919050565b6000806000806000858703610180811215620005f857600080fd5b86516001600160401b03808211156200061057600080fd5b6200061e8a838b0162000533565b975060208901519150808211156200063557600080fd5b506200064489828a0162000533565b9550506200065560408801620005c0565b93506060870151925061010080607f19830112156200067357600080fd5b6200067d620004d4565b91506200068d60808901620005c0565b82526200069d60a08901620005c0565b6020830152620006b060c08901620005c0565b6040830152620006c360e08901620005c0565b6060830152620006d5818901620005c0565b608083015250620006ea6101208801620005c0565b60a0820152620006fe6101408801620005c0565b60c0820152620007126101608801620005c0565b60e0820152809150509295509295909350565b600181811c908216806200073a57607f821691505b6020821081036200075b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620007af57600081815260208120601f850160051c810160208610156200078a5750805b601f850160051c820191505b81811015620007ab5782815560010162000796565b5050505b505050565b81516001600160401b03811115620007d057620007d0620004be565b620007e881620007e1845462000725565b8462000761565b602080601f831160018114620008205760008415620008075750858301515b600019600386901b1c1916600185901b178555620007ab565b600085815260208120601f198616915b82811015620008515788860151825594840194600190910190840162000830565b5085821015620008705787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161014051610160516101805161300b620009456000396000818161049501526125f401526000818161044801526117d2015260008181610797015261171901526000818161059301528181611744015261180001526000818161040e01526114b50152600081816103c00152818161138e01528181611416015261153f01526000818161062701526115e60152600081816103e701526116700152600081816104bc0152611302015261300b6000f3fe608060405234801561001057600080fd5b50600436106102cf5760003560e01c80636c15314f1161018c578063a948f0ae116100ee578063d7aecbb711610097578063e985e9c511610071578063e985e9c5146107de578063ec8e1e131461081a578063f2fde38b1461082d57600080fd5b8063d7aecbb71461077f578063de2c100814610792578063e91b0a41146107b957600080fd5b8063c4720663116100c8578063c47206631461069f578063c87b56dd146106aa578063d345366e146106bd57600080fd5b8063a948f0ae14610649578063aec0932d14610679578063b88d4fde1461068c57600080fd5b806381d3c435116101505780639841a0181161012a5780639841a018146105fc578063a22cb4651461060f578063a3a640171461062257600080fd5b806381d3c435146105d05780638da5cb5b146105e357806395d89b41146105f457600080fd5b80636c15314f1461056d5780636df881ae146105805780636eef94971461058e57806370a08231146105b5578063715018a6146105c857600080fd5b8063244788b51161023557806340c10f19116101f957806356d83ed9116101d357806356d83ed91461053457806360e1753f146105475780636352211e1461055a57600080fd5b806340c10f19146104de57806342842e0e1461050e5780634f6ccce71461052157600080fd5b8063244788b51461044357806326cc133e1461046a5780632f745c591461047d57806337c79730146104905780633d83908a146104b757600080fd5b806310a6b766116102975780631f7af3c3116102715780631f7af3c3146103e25780632155c0b01461040957806323b872dd1461043057600080fd5b806310a6b7661461039257806318160ddd146103b35780631d00bcdb146103bb57600080fd5b806301ffc9a7146102d457806306fdde03146102fc578063081812fc14610311578063095ea7b31461033c578063106d8bbb14610351575b600080fd5b6102e76102e2366004612a5d565b610840565b60405190151581526020015b60405180910390f35b61030461086b565b6040516102f39190612aca565b61032461031f366004612add565b6108fd565b6040516001600160a01b0390911681526020016102f3565b61034f61034a366004612b12565b610997565b005b61037a61035f366004612add565b6000908152600d60205260409020546001600160501b031690565b6040516001600160501b0390911681526020016102f3565b6103a56103a0366004612add565b610aac565b6040519081526020016102f3565b6008546103a5565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61034f61043e366004612b3c565b610b25565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b600c54610324906001600160a01b031681565b6103a561048b366004612b12565b610ba0565b6103a57f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6104f16104ec366004612b12565b610c36565b604080519283526001600160501b039091166020830152016102f3565b61034f61051c366004612b3c565b610d76565b6103a561052f366004612add565b610d91565b600b54610324906001600160a01b031681565b6103a5610555366004612add565b610e24565b610324610568366004612add565b610ea6565b6103a561057b366004612add565b610f1d565b6103a561035f366004612add565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103a56105c3366004612b78565b610fbb565b61034f611042565b61034f6105de366004612b78565b6110a8565b600a546001600160a01b0316610324565b61030461121f565b61037a61060a366004612b93565b61122e565b61034f61061d366004612bc6565b611946565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61037a610657366004612add565b6000908152600d6020526040902054600160501b90046001600160501b031690565b6103a5610687366004612add565b611955565b61034f61069a366004612c71565b6119d7565b6103a5633b9aca0081565b6103046106b8366004612add565b611a59565b6107416106cb366004612add565b6000818152600d6020908152604091829020825160a08101845290546001600160501b03808216808452600160501b830490911693830184905263ffffffff600160a01b83048116958401869052600160c01b8304811660608501819052600160e01b9093041660809093018390529590929450565b604080516001600160501b03968716815295909416602086015263ffffffff928316938501939093528116606084015216608082015260a0016102f3565b6103a561078d366004612add565b611bb7565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6107cc6107c7366004612add565b611c39565b60405160ff90911681526020016102f3565b6102e76107ec366004612d1c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61034f610828366004612b78565b611cb1565b61034f61083b366004612b78565b611d9e565b60006001600160e01b0319821663780e9d6360e01b1480610865575061086582611e66565b92915050565b60606000805461087a90612d4f565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690612d4f565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661097b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109a282610ea6565b9050806001600160a01b0316836001600160a01b031603610a0f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610972565b336001600160a01b0382161480610a2b5750610a2b81336107ec565b610a9d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610972565b610aa78383611eb6565b505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612da1565b509295945050505050565b610b2f3382611f24565b610b955760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b610aa783838361201b565b6000610bab83610fbb565b8210610c0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610972565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600080610c416121c2565b6000610c4c60085490565b610c57906001612e1f565b6040805160a0810182526000808252602080830182905282840182905260608084018390526080808501849052855180840188905242818801528083018c905286518082039093018352019094528351930192909220929350916001600160501b0380821684526000858152600d6020908152604091829020865181549288015193880151606089015160808a015163ffffffff908116600160e01b026001600160e01b03928216600160c01b0263ffffffff60c01b1992909416600160a01b029190911667ffffffffffffffff60a01b19978916600160501b026001600160a01b0319909716949098169390931794909417949094169490941792909217169190911790559050610d69878461222f565b9196919550909350505050565b610aa7838383604051806020016040528060008152506119d7565b6000610d9c60085490565b8210610dff5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610972565b60088281548110610e1257610e12612e32565b90600052602060002001549050919050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612da1565b50505067ffffffffffffffff169392505050565b6000818152600260205260408120546001600160a01b0316806108655760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610972565b6000818152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b820416938201849052600160a01b810463ffffffff90811693830193909352600160c01b810483166060830152600160e01b81049092166080808301919091529092610fb49290911b79ffffffffffffffffffff0000000000000000000000000000000016612e1f565b9392505050565b60006001600160a01b0382166110265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610972565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461109c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6110a6600061237d565b565b600a546001600160a01b031633146111025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b03811661117e5760405162461bcd60e51b815260206004820152603460248201527f426f6e644e46543a205f636869636b656e426f6e644d616e616765724164647260448201527f657373206d757374206265206e6f6e2d7a65726f0000000000000000000000006064820152608401610972565b600b546001600160a01b0316156111fd5760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a2073657441646472657373657328292063616e206f6e6c7960448201527f2062652063616c6c6564206f6e636500000000000000000000000000000000006064820152608401610972565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805461087a90612d4f565b60006112386121c2565b6000838152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b8204168285015263ffffffff600160a01b8204811683850152600160c01b82048116606080850191909152600160e01b9092041660808084019190915283518086018a905242818601528083018990528451808203909301835201909252815191909201209091906001600160501b038116602084015260405163d66a255360e01b81526001600160a01b038881166004830152919250611372917f0000000000000000000000000000000000000000000000000000000000000000169063d66a255390602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612e48565b6123cf565b826040019063ffffffff16908163ffffffff16815250506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612e48565b11156115c1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ec1ebd7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612e48565b6040516370a0823160e01b81526001600160a01b0389811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115209190612e48565b6040516370a0823160e01b81526001600160a01b038a811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115aa9190612e48565b6115b49190612e1f565b6115be9190612e61565b90505b6040516305a4d3f160e21b81526001600160a01b0388811660048301526116ef9183917f000000000000000000000000000000000000000000000000000000000000000016906316934fc490602401602060405180830381865afa15801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190612e48565b6040516370a0823160e01b81526001600160a01b038b811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156116b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116db9190612e48565b6116e59190612e1f565b61136d9190612e1f565b63ffffffff1660608401526040516301e8cff360e31b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690630f467f9890604401606060405180830381865afa15801561178d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b19190612e80565b50506040516301e8cff360e31b81526001600160a01b038a811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301529192506000917f00000000000000000000000000000000000000000000000000000000000000001690630f467f9890604401606060405180830381865afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190612e80565b5050905061188d633b9aca0082846118839190612e1f565b61136d9190612e61565b63ffffffff908116608087019081526000998a52600d602090815260409a8b902088518154928a01519c8a01516060909a015193518516600160e01b026001600160e01b03948616600160c01b0263ffffffff60c01b199b909616600160a01b029a909a1667ffffffffffffffff60a01b196001600160501b039e8f16600160501b026001600160a01b03199095169e9092169d909d1792909217919091169a909a179190911716949094179096555095945050505050565b6119513383836123f0565b5050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa15801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190612da1565b5067ffffffffffffffff1695945050505050565b6119e13383611f24565b611a475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b611a53848484846124be565b50505050565b6000818152600260205260409020546060906001600160a01b0316611ad15760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a2055524920717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610972565b600c546001600160a01b0316611af65760405180602001604052806000815250610865565b600c546000838152600d602052604090819020905163b58d3bd160e01b81526004810185905290546001600160501b038082166024840152605082901c16604483015263ffffffff60a082901c8116606484015260c082901c16608483015260e01c60a48201526001600160a01b039091169063b58d3bd19060c401600060405180830381865afa158015611b8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108659190810190612eae565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612da1565b505067ffffffffffffffff16949350505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190612da1565b9695505050505050565b600a546001600160a01b03163314611d0b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b600b546001600160a01b0316611d785760405162461bcd60e51b815260206004820152602c60248201527f426f6e644e46543a207365744164647265737365732829206d7573742062652060448201526b18d85b1b195908199a5c9cdd60a21b6064820152608401610972565b600c80546001600160a01b0319166001600160a01b038316179055611d9b611042565b50565b600a546001600160a01b03163314611df85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b038116611e5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610972565b611d9b8161237d565b60006001600160e01b031982166380ac58cd60e01b1480611e9757506001600160e01b03198216635b5e139f60e01b145b8061086557506301ffc9a760e01b6001600160e01b0319831614610865565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611eeb82610ea6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610972565b6000611fa883610ea6565b9050806001600160a01b0316846001600160a01b03161480611fef57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120135750836001600160a01b0316612008846108fd565b6001600160a01b0316145b949350505050565b826001600160a01b031661202e82610ea6565b6001600160a01b0316146120925760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610972565b6001600160a01b0382166120f45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610972565b6120ff83838361253c565b61210a600082611eb6565b6001600160a01b0383166000908152600360205260408120805460019290612133908490612f25565b90915550506001600160a01b0382166000908152600360205260408120805460019290612161908490612e1f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546001600160a01b031633146110a65760405162461bcd60e51b815260206004820152602a60248201527f426f6e644e46543a2043616c6c6572206d75737420626520436869636b656e4260448201526937b73226b0b730b3b2b960b11b6064820152608401610972565b6001600160a01b0382166122855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610972565b6000818152600260205260409020546001600160a01b0316156122ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610972565b6122f66000838361253c565b6001600160a01b038216600090815260036020526040812080546001929061231f908490612e1f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108656123e6670de0b6b3a764000084612f38565b63ffffffff61269d565b816001600160a01b0316836001600160a01b0316036124515760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610972565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124c984848461201b565b6124d5848484846126b3565b611a535760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b6001600160a01b0383161561269257600b5460405163da10594360e01b81526004810183905260009182916001600160a01b039091169063da1059439060240160a060405180830381865afa158015612599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bd9190612da1565b945067ffffffffffffffff169450505050600160038111156125e1576125e1612f5a565b60ff168160ff16148061261d57506126197f000000000000000000000000000000000000000000000000000000000000000083612e1f565b4210155b61268f5760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a2063616e6e6f74207472616e7366657220647572696e672060448201527f6c6f636b6f757420706572696f640000000000000000000000000000000000006064820152608401610972565b50505b610aa78383836127ff565b60008183106126ac5781610fb4565b5090919050565b60006001600160a01b0384163b156127f457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126f7903390899088908890600401612f70565b6020604051808303816000875af1925050508015612732575060408051601f3d908101601f1916820190925261272f91810190612fa2565b60015b6127da573d808015612760576040519150601f19603f3d011682016040523d82523d6000602084013e612765565b606091505b5080516000036127d25760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612013565b506001949350505050565b6001600160a01b03831661285a5761285581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d83826128b7565b6001600160a01b03821661289457610aa781612954565b826001600160a01b0316826001600160a01b031614610aa757610aa78282612a03565b600060016128c484610fbb565b6128ce9190612f25565b600083815260076020526040902054909150808214612921576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296690600190612f25565b6000838152600960205260408120546008805493945090928490811061298e5761298e612e32565b9060005260206000200154905080600883815481106129af576129af612e32565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129e7576129e7612fbf565b6001900381819060005260206000200160009055905550505050565b6000612a0e83610fbb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981168114611d9b57600080fd5b600060208284031215612a6f57600080fd5b8135610fb481612a47565b60005b83811015612a95578181015183820152602001612a7d565b50506000910152565b60008151808452612ab6816020860160208601612a7a565b601f01601f19169290920160200192915050565b602081526000610fb46020830184612a9e565b600060208284031215612aef57600080fd5b5035919050565b80356001600160a01b0381168114612b0d57600080fd5b919050565b60008060408385031215612b2557600080fd5b612b2e83612af6565b946020939093013593505050565b600080600060608486031215612b5157600080fd5b612b5a84612af6565b9250612b6860208501612af6565b9150604084013590509250925092565b600060208284031215612b8a57600080fd5b610fb482612af6565b600080600060608486031215612ba857600080fd5b612bb184612af6565b95602085013595506040909401359392505050565b60008060408385031215612bd957600080fd5b612be283612af6565b915060208301358015158114612bf757600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c4157612c41612c02565b604052919050565b600067ffffffffffffffff821115612c6357612c63612c02565b50601f01601f191660200190565b60008060008060808587031215612c8757600080fd5b612c9085612af6565b9350612c9e60208601612af6565b925060408501359150606085013567ffffffffffffffff811115612cc157600080fd5b8501601f81018713612cd257600080fd5b8035612ce5612ce082612c49565b612c18565b818152886020838501011115612cfa57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d2f57600080fd5b612d3883612af6565b9150612d4660208401612af6565b90509250929050565b600181811c90821680612d6357607f821691505b602082108103612d8357634e487b7160e01b600052602260045260246000fd5b50919050565b805167ffffffffffffffff81168114612b0d57600080fd5b600080600080600060a08688031215612db957600080fd5b85519450612dc960208701612d89565b9350612dd760408701612d89565b9250612de560608701612d89565b9150608086015160ff81168114612dfb57600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b8082018082111561086557610865612e09565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e5a57600080fd5b5051919050565b6000816000190483118215151615612e7b57612e7b612e09565b500290565b600080600060608486031215612e9557600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215612ec057600080fd5b815167ffffffffffffffff811115612ed757600080fd5b8201601f81018413612ee857600080fd5b8051612ef6612ce082612c49565b818152856020838501011115612f0b57600080fd5b612f1c826020830160208601612a7a565b95945050505050565b8181038181111561086557610865612e09565b600082612f5557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152611ca76080830184612a9e565b600060208284031215612fb457600080fd5b8151610fb481612a47565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201183f556749337559718f1f928c2eb9400098116fa3b1e2a4cbe3f36129f11e464736f6c63430008100033"; + static readonly abi: ({ + inputs: ({ + internalType: string; + name: string; + type: string; + components?: undefined; + } | { + components: { + internalType: string; + name: string; + type: string; + }[]; + internalType: string; + name: string; + type: string; + })[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): BondNFTInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BondNFT; +} +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.js new file mode 100644 index 0000000..1437df9 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/BondNFT__factory.js @@ -0,0 +1,1003 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BondNFT__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "address", + name: "_initialArtworkAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_transferLockoutPeriodSeconds", + type: "uint256", + }, + { + components: [ + { + internalType: "address", + name: "troveManagerAddress", + type: "address", + }, + { + internalType: "address", + name: "lqtyToken", + type: "address", + }, + { + internalType: "address", + name: "lqtyStaking", + type: "address", + }, + { + internalType: "address", + name: "pickleLQTYJar", + type: "address", + }, + { + internalType: "address", + name: "pickleLQTYFarm", + type: "address", + }, + { + internalType: "address", + name: "curveGaugeController", + type: "address", + }, + { + internalType: "address", + name: "curveLUSD3CRVGauge", + type: "address", + }, + { + internalType: "address", + name: "curveLUSDFRAXGauge", + type: "address", + }, + ], + internalType: "struct BondNFT.LiquityDataAddresses", + name: "_liquityDataAddresses", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "CURVE_GAUGE_SLOPES_PRECISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "artwork", + outputs: [ + { + internalType: "contract IBondNFTArtwork", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "chickenBondManager", + outputs: [ + { + internalType: "contract IChickenBondManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveGaugeController", + outputs: [ + { + internalType: "contract ICurveGaugeController", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveLUSD3CRVGauge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveLUSDFRAXGauge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondAmount", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondClaimedBLUSD", + outputs: [ + { + internalType: "uint256", + name: "claimedBLUSD", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondEndTime", + outputs: [ + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondExtraData", + outputs: [ + { + internalType: "uint80", + name: "initialHalfDna", + type: "uint80", + }, + { + internalType: "uint80", + name: "finalHalfDna", + type: "uint80", + }, + { + internalType: "uint32", + name: "troveSize", + type: "uint32", + }, + { + internalType: "uint32", + name: "lqtyAmount", + type: "uint32", + }, + { + internalType: "uint32", + name: "curveGaugeSlopes", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondFinalDna", + outputs: [ + { + internalType: "uint256", + name: "finalDna", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondFinalHalfDna", + outputs: [ + { + internalType: "uint80", + name: "finalHalfDna", + type: "uint80", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondInitialDna", + outputs: [ + { + internalType: "uint256", + name: "initialDna", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondInitialHalfDna", + outputs: [ + { + internalType: "uint80", + name: "initialHalfDna", + type: "uint80", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondStartTime", + outputs: [ + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "getBondStatus", + outputs: [ + { + internalType: "uint8", + name: "status", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lqtyStaking", + outputs: [ + { + internalType: "contract ILQTYStaking", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lqtyToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_bonder", + type: "address", + }, + { + internalType: "uint256", + name: "_permanentSeed", + type: "uint256", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint80", + name: "", + type: "uint80", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pickleLQTYFarm", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pickleLQTYJar", + outputs: [ + { + internalType: "contract IPickleJar", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_chickenBondManagerAddress", + type: "address", + }, + ], + name: "setAddresses", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_artworkAddress", + type: "address", + }, + ], + name: "setArtworkAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_bonder", + type: "address", + }, + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permanentSeed", + type: "uint256", + }, + ], + name: "setFinalExtraData", + outputs: [ + { + internalType: "uint80", + name: "", + type: "uint80", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenOfOwnerByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenID", + type: "uint256", + }, + ], + name: "tokenURI", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "transferLockoutPeriodSeconds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "troveManager", + outputs: [ + { + internalType: "contract ITroveManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x6101a06040523480156200001257600080fd5b5060405162003950380380620039508339810160408190526200003591620005dd565b84846000620000458382620007b4565b506001620000548282620007b4565b505050620000716200006b6200046860201b60201c565b6200046c565b80516001600160a01b0316620000e55760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a205f74726f76654d616e6167657241646472657373206d7560448201526d7374206265206e6f6e2d7a65726f60901b60648201526084015b60405180910390fd5b60208101516001600160a01b03166200014d5760405162461bcd60e51b8152602060048201526024808201527f426f6e644e46543a205f6c717479546f6b656e206d757374206265206e6f6e2d6044820152637a65726f60e01b6064820152608401620000dc565b60408101516001600160a01b0316620001b85760405162461bcd60e51b815260206004820152602660248201527f426f6e644e46543a205f6c7174795374616b696e67206d757374206265206e6f6044820152656e2d7a65726f60d01b6064820152608401620000dc565b60608101516001600160a01b0316620002255760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a205f7069636b6c654c5154594a6172206d757374206265206044820152676e6f6e2d7a65726f60c01b6064820152608401620000dc565b60808101516001600160a01b0316620002935760405162461bcd60e51b815260206004820152602960248201527f426f6e644e46543a205f7069636b6c654c5154594661726d206d757374206265604482015268206e6f6e2d7a65726f60b81b6064820152608401620000dc565b60a08101516001600160a01b0316620003075760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a205f63757276654761756765436f6e74726f6c6c6572206d60448201526e757374206265206e6f6e2d7a65726f60881b6064820152608401620000dc565b60c08101516001600160a01b0316620003795760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344334352564761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b60e08101516001600160a01b0316620003eb5760405162461bcd60e51b815260206004820152602d60248201527f426f6e644e46543a205f63757276654c555344465241584761756765206d757360448201526c74206265206e6f6e2d7a65726f60981b6064820152608401620000dc565b600c80546001600160a01b0319166001600160a01b03948516179055610180919091528051821660809081526020820151831660a09081526040830151841660c09081526060840151851660e090815292840151851661010052908301518416610120528201518316610140520151166101605250620008809050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715620004fa57620004fa620004be565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200052b576200052b620004be565b604052919050565b600082601f8301126200054557600080fd5b81516001600160401b03811115620005615762000561620004be565b602062000577601f8301601f1916820162000500565b82815285828487010111156200058c57600080fd5b60005b83811015620005ac5785810183015182820184015282016200058f565b506000928101909101919091529392505050565b80516001600160a01b0381168114620005d857600080fd5b919050565b6000806000806000858703610180811215620005f857600080fd5b86516001600160401b03808211156200061057600080fd5b6200061e8a838b0162000533565b975060208901519150808211156200063557600080fd5b506200064489828a0162000533565b9550506200065560408801620005c0565b93506060870151925061010080607f19830112156200067357600080fd5b6200067d620004d4565b91506200068d60808901620005c0565b82526200069d60a08901620005c0565b6020830152620006b060c08901620005c0565b6040830152620006c360e08901620005c0565b6060830152620006d5818901620005c0565b608083015250620006ea6101208801620005c0565b60a0820152620006fe6101408801620005c0565b60c0820152620007126101608801620005c0565b60e0820152809150509295509295909350565b600181811c908216806200073a57607f821691505b6020821081036200075b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620007af57600081815260208120601f850160051c810160208610156200078a5750805b601f850160051c820191505b81811015620007ab5782815560010162000796565b5050505b505050565b81516001600160401b03811115620007d057620007d0620004be565b620007e881620007e1845462000725565b8462000761565b602080601f831160018114620008205760008415620008075750858301515b600019600386901b1c1916600185901b178555620007ab565b600085815260208120601f198616915b82811015620008515788860151825594840194600190910190840162000830565b5085821015620008705787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161014051610160516101805161300b620009456000396000818161049501526125f401526000818161044801526117d2015260008181610797015261171901526000818161059301528181611744015261180001526000818161040e01526114b50152600081816103c00152818161138e01528181611416015261153f01526000818161062701526115e60152600081816103e701526116700152600081816104bc0152611302015261300b6000f3fe608060405234801561001057600080fd5b50600436106102cf5760003560e01c80636c15314f1161018c578063a948f0ae116100ee578063d7aecbb711610097578063e985e9c511610071578063e985e9c5146107de578063ec8e1e131461081a578063f2fde38b1461082d57600080fd5b8063d7aecbb71461077f578063de2c100814610792578063e91b0a41146107b957600080fd5b8063c4720663116100c8578063c47206631461069f578063c87b56dd146106aa578063d345366e146106bd57600080fd5b8063a948f0ae14610649578063aec0932d14610679578063b88d4fde1461068c57600080fd5b806381d3c435116101505780639841a0181161012a5780639841a018146105fc578063a22cb4651461060f578063a3a640171461062257600080fd5b806381d3c435146105d05780638da5cb5b146105e357806395d89b41146105f457600080fd5b80636c15314f1461056d5780636df881ae146105805780636eef94971461058e57806370a08231146105b5578063715018a6146105c857600080fd5b8063244788b51161023557806340c10f19116101f957806356d83ed9116101d357806356d83ed91461053457806360e1753f146105475780636352211e1461055a57600080fd5b806340c10f19146104de57806342842e0e1461050e5780634f6ccce71461052157600080fd5b8063244788b51461044357806326cc133e1461046a5780632f745c591461047d57806337c79730146104905780633d83908a146104b757600080fd5b806310a6b766116102975780631f7af3c3116102715780631f7af3c3146103e25780632155c0b01461040957806323b872dd1461043057600080fd5b806310a6b7661461039257806318160ddd146103b35780631d00bcdb146103bb57600080fd5b806301ffc9a7146102d457806306fdde03146102fc578063081812fc14610311578063095ea7b31461033c578063106d8bbb14610351575b600080fd5b6102e76102e2366004612a5d565b610840565b60405190151581526020015b60405180910390f35b61030461086b565b6040516102f39190612aca565b61032461031f366004612add565b6108fd565b6040516001600160a01b0390911681526020016102f3565b61034f61034a366004612b12565b610997565b005b61037a61035f366004612add565b6000908152600d60205260409020546001600160501b031690565b6040516001600160501b0390911681526020016102f3565b6103a56103a0366004612add565b610aac565b6040519081526020016102f3565b6008546103a5565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61034f61043e366004612b3c565b610b25565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b600c54610324906001600160a01b031681565b6103a561048b366004612b12565b610ba0565b6103a57f000000000000000000000000000000000000000000000000000000000000000081565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6104f16104ec366004612b12565b610c36565b604080519283526001600160501b039091166020830152016102f3565b61034f61051c366004612b3c565b610d76565b6103a561052f366004612add565b610d91565b600b54610324906001600160a01b031681565b6103a5610555366004612add565b610e24565b610324610568366004612add565b610ea6565b6103a561057b366004612add565b610f1d565b6103a561035f366004612add565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6103a56105c3366004612b78565b610fbb565b61034f611042565b61034f6105de366004612b78565b6110a8565b600a546001600160a01b0316610324565b61030461121f565b61037a61060a366004612b93565b61122e565b61034f61061d366004612bc6565b611946565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b61037a610657366004612add565b6000908152600d6020526040902054600160501b90046001600160501b031690565b6103a5610687366004612add565b611955565b61034f61069a366004612c71565b6119d7565b6103a5633b9aca0081565b6103046106b8366004612add565b611a59565b6107416106cb366004612add565b6000818152600d6020908152604091829020825160a08101845290546001600160501b03808216808452600160501b830490911693830184905263ffffffff600160a01b83048116958401869052600160c01b8304811660608501819052600160e01b9093041660809093018390529590929450565b604080516001600160501b03968716815295909416602086015263ffffffff928316938501939093528116606084015216608082015260a0016102f3565b6103a561078d366004612add565b611bb7565b6103247f000000000000000000000000000000000000000000000000000000000000000081565b6107cc6107c7366004612add565b611c39565b60405160ff90911681526020016102f3565b6102e76107ec366004612d1c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61034f610828366004612b78565b611cb1565b61034f61083b366004612b78565b611d9e565b60006001600160e01b0319821663780e9d6360e01b1480610865575061086582611e66565b92915050565b60606000805461087a90612d4f565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690612d4f565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661097b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109a282610ea6565b9050806001600160a01b0316836001600160a01b031603610a0f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610972565b336001600160a01b0382161480610a2b5750610a2b81336107ec565b610a9d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610972565b610aa78383611eb6565b505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612da1565b509295945050505050565b610b2f3382611f24565b610b955760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b610aa783838361201b565b6000610bab83610fbb565b8210610c0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610972565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600080610c416121c2565b6000610c4c60085490565b610c57906001612e1f565b6040805160a0810182526000808252602080830182905282840182905260608084018390526080808501849052855180840188905242818801528083018c905286518082039093018352019094528351930192909220929350916001600160501b0380821684526000858152600d6020908152604091829020865181549288015193880151606089015160808a015163ffffffff908116600160e01b026001600160e01b03928216600160c01b0263ffffffff60c01b1992909416600160a01b029190911667ffffffffffffffff60a01b19978916600160501b026001600160a01b0319909716949098169390931794909417949094169490941792909217169190911790559050610d69878461222f565b9196919550909350505050565b610aa7838383604051806020016040528060008152506119d7565b6000610d9c60085490565b8210610dff5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610972565b60088281548110610e1257610e12612e32565b90600052602060002001549050919050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612da1565b50505067ffffffffffffffff169392505050565b6000818152600260205260408120546001600160a01b0316806108655760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610972565b6000818152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b820416938201849052600160a01b810463ffffffff90811693830193909352600160c01b810483166060830152600160e01b81049092166080808301919091529092610fb49290911b79ffffffffffffffffffff0000000000000000000000000000000016612e1f565b9392505050565b60006001600160a01b0382166110265760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610972565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461109c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6110a6600061237d565b565b600a546001600160a01b031633146111025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b03811661117e5760405162461bcd60e51b815260206004820152603460248201527f426f6e644e46543a205f636869636b656e426f6e644d616e616765724164647260448201527f657373206d757374206265206e6f6e2d7a65726f0000000000000000000000006064820152608401610972565b600b546001600160a01b0316156111fd5760405162461bcd60e51b815260206004820152602f60248201527f426f6e644e46543a2073657441646472657373657328292063616e206f6e6c7960448201527f2062652063616c6c6564206f6e636500000000000000000000000000000000006064820152608401610972565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805461087a90612d4f565b60006112386121c2565b6000838152600d60209081526040808320815160a08101835290546001600160501b038082168352600160501b8204168285015263ffffffff600160a01b8204811683850152600160c01b82048116606080850191909152600160e01b9092041660808084019190915283518086018a905242818601528083018990528451808203909301835201909252815191909201209091906001600160501b038116602084015260405163d66a255360e01b81526001600160a01b038881166004830152919250611372917f0000000000000000000000000000000000000000000000000000000000000000169063d66a255390602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612e48565b6123cf565b826040019063ffffffff16908163ffffffff16815250506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612e48565b11156115c1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ec1ebd7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612e48565b6040516370a0823160e01b81526001600160a01b0389811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115209190612e48565b6040516370a0823160e01b81526001600160a01b038a811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611586573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115aa9190612e48565b6115b49190612e1f565b6115be9190612e61565b90505b6040516305a4d3f160e21b81526001600160a01b0388811660048301526116ef9183917f000000000000000000000000000000000000000000000000000000000000000016906316934fc490602401602060405180830381865afa15801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190612e48565b6040516370a0823160e01b81526001600160a01b038b811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156116b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116db9190612e48565b6116e59190612e1f565b61136d9190612e1f565b63ffffffff1660608401526040516301e8cff360e31b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690630f467f9890604401606060405180830381865afa15801561178d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b19190612e80565b50506040516301e8cff360e31b81526001600160a01b038a811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301529192506000917f00000000000000000000000000000000000000000000000000000000000000001690630f467f9890604401606060405180830381865afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190612e80565b5050905061188d633b9aca0082846118839190612e1f565b61136d9190612e61565b63ffffffff908116608087019081526000998a52600d602090815260409a8b902088518154928a01519c8a01516060909a015193518516600160e01b026001600160e01b03948616600160c01b0263ffffffff60c01b199b909616600160a01b029a909a1667ffffffffffffffff60a01b196001600160501b039e8f16600160501b026001600160a01b03199095169e9092169d909d1792909217919091169a909a179190911716949094179096555095945050505050565b6119513383836123f0565b5050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa15801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190612da1565b5067ffffffffffffffff1695945050505050565b6119e13383611f24565b611a475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610972565b611a53848484846124be565b50505050565b6000818152600260205260409020546060906001600160a01b0316611ad15760405162461bcd60e51b815260206004820152602860248201527f426f6e644e46543a2055524920717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610972565b600c546001600160a01b0316611af65760405180602001604052806000815250610865565b600c546000838152600d602052604090819020905163b58d3bd160e01b81526004810185905290546001600160501b038082166024840152605082901c16604483015263ffffffff60a082901c8116606484015260c082901c16608483015260e01c60a48201526001600160a01b039091169063b58d3bd19060c401600060405180830381865afa158015611b8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108659190810190612eae565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612da1565b505067ffffffffffffffff16949350505050565b600b5460405163da10594360e01b8152600481018390526000916001600160a01b03169063da1059439060240160a060405180830381865afa158015611c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190612da1565b9695505050505050565b600a546001600160a01b03163314611d0b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b600b546001600160a01b0316611d785760405162461bcd60e51b815260206004820152602c60248201527f426f6e644e46543a207365744164647265737365732829206d7573742062652060448201526b18d85b1b195908199a5c9cdd60a21b6064820152608401610972565b600c80546001600160a01b0319166001600160a01b038316179055611d9b611042565b50565b600a546001600160a01b03163314611df85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610972565b6001600160a01b038116611e5d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610972565b611d9b8161237d565b60006001600160e01b031982166380ac58cd60e01b1480611e9757506001600160e01b03198216635b5e139f60e01b145b8061086557506301ffc9a760e01b6001600160e01b0319831614610865565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611eeb82610ea6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611f9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610972565b6000611fa883610ea6565b9050806001600160a01b0316846001600160a01b03161480611fef57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120135750836001600160a01b0316612008846108fd565b6001600160a01b0316145b949350505050565b826001600160a01b031661202e82610ea6565b6001600160a01b0316146120925760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610972565b6001600160a01b0382166120f45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610972565b6120ff83838361253c565b61210a600082611eb6565b6001600160a01b0383166000908152600360205260408120805460019290612133908490612f25565b90915550506001600160a01b0382166000908152600360205260408120805460019290612161908490612e1f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546001600160a01b031633146110a65760405162461bcd60e51b815260206004820152602a60248201527f426f6e644e46543a2043616c6c6572206d75737420626520436869636b656e4260448201526937b73226b0b730b3b2b960b11b6064820152608401610972565b6001600160a01b0382166122855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610972565b6000818152600260205260409020546001600160a01b0316156122ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610972565b6122f66000838361253c565b6001600160a01b038216600090815260036020526040812080546001929061231f908490612e1f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108656123e6670de0b6b3a764000084612f38565b63ffffffff61269d565b816001600160a01b0316836001600160a01b0316036124515760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610972565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124c984848461201b565b6124d5848484846126b3565b611a535760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b6001600160a01b0383161561269257600b5460405163da10594360e01b81526004810183905260009182916001600160a01b039091169063da1059439060240160a060405180830381865afa158015612599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bd9190612da1565b945067ffffffffffffffff169450505050600160038111156125e1576125e1612f5a565b60ff168160ff16148061261d57506126197f000000000000000000000000000000000000000000000000000000000000000083612e1f565b4210155b61268f5760405162461bcd60e51b815260206004820152602e60248201527f426f6e644e46543a2063616e6e6f74207472616e7366657220647572696e672060448201527f6c6f636b6f757420706572696f640000000000000000000000000000000000006064820152608401610972565b50505b610aa78383836127ff565b60008183106126ac5781610fb4565b5090919050565b60006001600160a01b0384163b156127f457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126f7903390899088908890600401612f70565b6020604051808303816000875af1925050508015612732575060408051601f3d908101601f1916820190925261272f91810190612fa2565b60015b6127da573d808015612760576040519150601f19603f3d011682016040523d82523d6000602084013e612765565b606091505b5080516000036127d25760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610972565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612013565b506001949350505050565b6001600160a01b03831661285a5761285581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d83826128b7565b6001600160a01b03821661289457610aa781612954565b826001600160a01b0316826001600160a01b031614610aa757610aa78282612a03565b600060016128c484610fbb565b6128ce9190612f25565b600083815260076020526040902054909150808214612921576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296690600190612f25565b6000838152600960205260408120546008805493945090928490811061298e5761298e612e32565b9060005260206000200154905080600883815481106129af576129af612e32565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129e7576129e7612fbf565b6001900381819060005260206000200160009055905550505050565b6000612a0e83610fbb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981168114611d9b57600080fd5b600060208284031215612a6f57600080fd5b8135610fb481612a47565b60005b83811015612a95578181015183820152602001612a7d565b50506000910152565b60008151808452612ab6816020860160208601612a7a565b601f01601f19169290920160200192915050565b602081526000610fb46020830184612a9e565b600060208284031215612aef57600080fd5b5035919050565b80356001600160a01b0381168114612b0d57600080fd5b919050565b60008060408385031215612b2557600080fd5b612b2e83612af6565b946020939093013593505050565b600080600060608486031215612b5157600080fd5b612b5a84612af6565b9250612b6860208501612af6565b9150604084013590509250925092565b600060208284031215612b8a57600080fd5b610fb482612af6565b600080600060608486031215612ba857600080fd5b612bb184612af6565b95602085013595506040909401359392505050565b60008060408385031215612bd957600080fd5b612be283612af6565b915060208301358015158114612bf757600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c4157612c41612c02565b604052919050565b600067ffffffffffffffff821115612c6357612c63612c02565b50601f01601f191660200190565b60008060008060808587031215612c8757600080fd5b612c9085612af6565b9350612c9e60208601612af6565b925060408501359150606085013567ffffffffffffffff811115612cc157600080fd5b8501601f81018713612cd257600080fd5b8035612ce5612ce082612c49565b612c18565b818152886020838501011115612cfa57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d2f57600080fd5b612d3883612af6565b9150612d4660208401612af6565b90509250929050565b600181811c90821680612d6357607f821691505b602082108103612d8357634e487b7160e01b600052602260045260246000fd5b50919050565b805167ffffffffffffffff81168114612b0d57600080fd5b600080600080600060a08688031215612db957600080fd5b85519450612dc960208701612d89565b9350612dd760408701612d89565b9250612de560608701612d89565b9150608086015160ff81168114612dfb57600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b8082018082111561086557610865612e09565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e5a57600080fd5b5051919050565b6000816000190483118215151615612e7b57612e7b612e09565b500290565b600080600060608486031215612e9557600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215612ec057600080fd5b815167ffffffffffffffff811115612ed757600080fd5b8201601f81018413612ee857600080fd5b8051612ef6612ce082612c49565b818152856020838501011115612f0b57600080fd5b612f1c826020830160208601612a7a565b95945050505050565b8181038181111561086557610865612e09565b600082612f5557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152611ca76080830184612a9e565b600060208284031215612fb457600080fd5b8151610fb481612a47565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201183f556749337559718f1f928c2eb9400098116fa3b1e2a4cbe3f36129f11e464736f6c63430008100033"; +const isSuperArgs = (xs) => xs.length > 1; +class BondNFT__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(name_, symbol_, _initialArtworkAddress, _transferLockoutPeriodSeconds, _liquityDataAddresses, overrides) { + return super.deploy(name_, symbol_, _initialArtworkAddress, _transferLockoutPeriodSeconds, _liquityDataAddresses, overrides || {}); + } + getDeployTransaction(name_, symbol_, _initialArtworkAddress, _transferLockoutPeriodSeconds, _liquityDataAddresses, overrides) { + return super.getDeployTransaction(name_, symbol_, _initialArtworkAddress, _transferLockoutPeriodSeconds, _liquityDataAddresses, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.BondNFT__factory = BondNFT__factory; +BondNFT__factory.bytecode = _bytecode; +BondNFT__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.d.ts new file mode 100644 index 0000000..65879fd --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.d.ts @@ -0,0 +1,63 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ChickenBondManager, ChickenBondManagerInterface } from "../ChickenBondManager"; +declare type ChickenBondManagerConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ChickenBondManager__factory extends ContractFactory { + constructor(...args: ChickenBondManagerConstructorParams); + deploy(_externalContractAddresses: ChickenBondManager.ExternalAdressesStruct, _params: ChickenBondManager.ParamsStruct, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(_externalContractAddresses: ChickenBondManager.ExternalAdressesStruct, _params: ChickenBondManager.ParamsStruct, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ChickenBondManager; + connect(signer: Signer): ChickenBondManager__factory; + static readonly bytecode = "0x6104006040523480156200001257600080fd5b50604051620058b9380380620058b983398101604081905262000035916200070c565b81516001600160a01b039081166080908152602080850151831660c090815261010080870151851660a0908152604080890151871660e090815260608a0151881690935294880151861661012052870151851661014052908601518416610160528501519092166101a052426103605282516103805290820151600d558101516103a08190526200011f5760405162461bcd60e51b815260206004820152602960248201527f43424d3a204d696e206163637275616c20706172616d657465722063616e6e6f60448201526874206265207a65726f60b81b60648201526084015b60405180910390fd5b60608101516200013890670de0b6b3a76400006200082c565b6103c05260808101516103e0526101208201516001600160a01b039081166101805260a08201516101c05260e0516040805163ddca3f4360e01b81529051600093929092169163ddca3f43916004808201926020929091908290030181865afa158015620001aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d0919062000848565b90506402540be400620001e482826200082c565b8360c00151620001f5919062000862565b62000201919062000884565b610320526402540be4006200021782826200082c565b8360e0015162000228919062000862565b62000234919062000884565b610340526101008201516101e052610120820151610200526101408201516102205261016082015161024052610180820151610260526101a0820151610280526101c0820151620002de5760405162461bcd60e51b815260206004820152602d60248201527f43424d3a204d494e20424f4e4420414d4f554e5420706172616d65746572206360448201526c616e6e6f74206265207a65726f60981b606482015260840162000116565b6101c08201516102a0526101e08201516102c0526102008201516102e0526102208201516103005260c0516101205160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200035e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003849190620008a7565b5060c05160e05160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620003dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004029190620008a7565b5060e0516101405160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200045b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004819190620008a7565b5060c0516101805160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620004da573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005009190620008a7565b506101605160e051604051630e177dc760e41b81526001600160a01b03918216600482015291169063e177dc70906024016020604051808303816000875af115801562000551573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005779190620008d2565b6001600160a01b0316610140516001600160a01b0316146200059d576200059d620008f0565b50505062000906565b60405161024081016001600160401b0381118282101715620005d857634e487b7160e01b600052604160045260246000fd5b60405290565b60405161014081016001600160401b0381118282101715620005d857634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200062857600080fd5b919050565b600061024082840312156200064157600080fd5b6200064b620005a6565b825181526020808401519082015260408084015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c080840151908201526101e080840151908201526102008084015190820152610220928301519281019290925250919050565b6000808284036103808112156200072257600080fd5b610140808212156200073357600080fd5b6200073d620005de565b91506200074a8562000610565b82526200075a6020860162000610565b60208301526200076d6040860162000610565b6040830152620007806060860162000610565b6060830152620007936080860162000610565b6080830152620007a660a0860162000610565b60a0830152620007b960c0860162000610565b60c0830152620007cc60e0860162000610565b60e0830152610100620007e181870162000610565b90830152610120620007f586820162000610565b81840152508193506200080b868287016200062d565b925050509250929050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000842576200084262000816565b92915050565b6000602082840312156200085b57600080fd5b5051919050565b60008160001904831182151516156200087f576200087f62000816565b500290565b600082620008a257634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215620008ba57600080fd5b81518015158114620008cb57600080fd5b9392505050565b600060208284031215620008e557600080fd5b620008cb8262000610565b634e487b7160e01b600052600160045260246000fd5b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a0516103c0516103e051614c5d62000c5c6000396000818161044801528181613311015261341a015260008181610b2e0152613485015260008181610a250152818161337101526134c001526000818161052c01526133e90152600081816109d001528181613335015281816133c50152613bbc015260008181610953015281816127a40152612b7b0152600081816108f201528181611c5f0152611f13015260008181610a670152610ba90152600081816104820152610bfc015260008181610712015281816110a5015281816114fe0152612d8e0152600081816108710152613a270152600081816106c4015261420d0152600081816107d6015281816124780152613d73015260008181610794015281816124990152613d3e0152600081816105940152613b980152600081816106eb0152611ffc015260008181610675015261384a01526000818161060501526137fa01526000818161075d015281816125f9015261457e0152600081816104a9015261488d015260006109a9015260008181610a97015281816123df01528181613fc501528181614051015281816140e9015281816144f301526146c501526000818161055c015281816111dd015281816118b8015281816131510152818161372b0152818161399c01528181613b1801526143d80152600081816108c301528181611bce01526127130152600081816105050152818161180a01528181611d3f01528181611de001528181611e7a015281816128750152818161293201528181612a5c01528181613f2d015261462f015260008181610982015281816116f80152818161196a01528181611a250152818161262e015281816129ca01528181612ae2015281816147d10152818161485b01526149010152600081816105d601528181610eda0152818161129e015281816120de015281816122fb01528181612f2a01528181613c59015261418801526000818161092c0152818161106c015281816114ce01528181611aa001528181612d5d01526135830152614c5d6000f3fe608060405234801561001057600080fd5b506004361061043e5760003560e01c80637cbc237311610236578063b83f91a21161013b578063cc0c986e116100c3578063e9dc9e6d11610087578063e9dc9e6d14610b18578063edb134f314610b20578063f1b0cff514610b29578063f3c4023d14610b50578063f58369b914610b5857600080fd5b8063cc0c986e14610a89578063cfc31f6f14610a92578063d2e892dd14610ab9578063da10594314610ac2578063e324634914610b0f57600080fd5b8063c3c297451161010a578063c3c2974514610a0d578063c484cc5f14610a20578063c6c50ce814610a47578063c6d2d26114610a4f578063c7b5548114610a6257600080fd5b8063b83f91a21461097d578063bb870317146109a4578063bfc12c05146109cb578063c0639bbd146109f257600080fd5b8063a21ec280116101be578063acf955c71161018d578063acf955c7146108ed578063aefcc4fd14610914578063b0f3af4714610927578063b23ad3ee1461094e578063b7a65dce1461097557600080fd5b8063a21ec280146108a2578063a79e5683146108b5578063a891c684146108be578063ac8af3a9146108e557600080fd5b806390d532901161020557806390d532901461085357806391dc186f1461085c5780639c283187146108645780639fbc4a5f1461086c578063a20baee61461089357600080fd5b80637cbc23731461081357806384c2dea51461083b5780638ac6e2f4146108435780638caffae11461084b57600080fd5b80634237e191116103475780636350e4b2116102cf578063695e89da11610293578063695e89da146107b65780636a57b253146107be5780636b4fbbed146107d15780636bdac50b146107f85780637b3c7df61461080057600080fd5b80636350e4b2146107455780636381211414610758578063653a81981461077f57806366462ab11461078757806367e48a7e1461078f57600080fd5b80635041382b116103165780635041382b146106bf57806351a643ae146106e6578063570dd5241461070d57806359372e2e1461073457806361ec893d1461073d57600080fd5b80634237e1911461065d5780634903970a146106705780634b10543b146106975780634bb41097146106ac57600080fd5b806335f1d0e0116103ca5780633792dcb9116103995780633792dcb9146105d157806339f01388146105f85780633a517326146106005780633b19e84a146106275780633cbe79261461064a57600080fd5b806335f1d0e014610587578063361628831461058f57806336e2819e146105b657806337303e58146105c957600080fd5b8063218751b211610411578063218751b214610500578063233b0ee71461052757806327fafcd31461054e57806333624a861461055757806335567cda1461057e57600080fd5b80630277407314610443578063071a75411461047d5780630f34d74d146104a45780631705a3bd146104e3575b600080fd5b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610474565b6009546104f09060ff1681565b6040519015158152602001610474565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600a5481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a60035481565b61046a610b61565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6105c436600461498c565b610b95565b61046a610c49565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b60015461046a565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61062f610c6d565b60408051938452602084019290925290820152606001610474565b61046a61065836600461498c565b610c87565b61046a61066b36600461498c565b610d55565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6106aa6106a536600461498c565b610e08565b005b61046a6106ba36600461498c565b6113a4565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a60055481565b61046a603c81565b61046a61075336600461498c565b6114ad565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6117ce565b61046a6117f1565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6118b3565b61046a6107cc3660046149ba565b611940565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a611a96565b6106aa61080e36600461498c565b611b39565b610826610821366004614a1c565b611fe5565b60408051928352602083019190915201610474565b61046a6123d2565b6106aa612476565b60005461046a565b61046a60045481565b61046a61254a565b60025461046a565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a670de0b6b3a764000081565b6106aa6108b036600461498c565b612574565b61046a60075481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6126a8565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6106aa61092236600461498c565b6126cc565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a612c44565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6109fa600081565b604051600f9190910b8152602001610474565b6106aa610a1b366004614a1c565b612c68565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a612f0d565b61046a610a5d36600461498c565b612f25565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600d5481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600c5481565b610ad5610ad036600461498c565b613000565b6040805195865267ffffffffffffffff948516602087015292841692850192909252909116606083015260ff16608082015260a001610474565b61046a60065481565b6106aa6130d5565b61046a600b5481565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a613130565b61046a600e5481565b600080610b6c61314c565b9050600080610b7a836131e1565b505050915091508082610b8d9190614a54565b935050505090565b600080610ba061325b565b90506000610bce7f00000000000000000000000000000000000000000000000000000000000000008361326d565b90506000670de0b6b3a764000082600754610be99190614a67565b610bf39190614a9c565b90506000610c217f000000000000000000000000000000000000000000000000000000000000000087614a9c565b610c2b9083614a54565b9050610c3f81670de0b6b3a76400006132f4565b9695505050505050565b600080610c5461314c565b90506000610c61826131e1565b50909695505050505050565b600080549080610c7b610b61565b91506001549050909192565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b830490931660608401528392916080830190600160c01b900460ff166003811115610cfe57610cfe614ab0565b6003811115610d0f57610d0f614ab0565b8152505090506000610d25600d54600e5461330c565b509050610d4d826040015167ffffffffffffffff16610d4784600001516134f0565b836134fc565b949350505050565b600080610d60613130565b6000848152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152939450919290916080830190600160c01b900460ff166003811115610ddb57610ddb614ab0565b6003811115610dec57610dec614ab0565b815250509050610d4d610e0282600001516134f0565b8361354e565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152906080830190600160c01b900460ff166003811115610e7d57610e7d614ab0565b6003811115610e8e57610e8e614ab0565b9052509050610e9c8261356d565b610ea98160800151613656565b6000610eb36136b7565b9050600080610ec0613724565b91509150600080610ed486600001516137d2565b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190614ac6565b158015610f6a575060095460ff16155b15610f8b57610f88866040015167ffffffffffffffff168585613843565b92505b6000610fa6876040015167ffffffffffffffff1683886134fc565b90506000610fb386612f25565b9050600081610fca84670de0b6b3a7640000614a67565b610fd49190614a9c565b9050610ff9610feb670de0b6b3a764000083614a9c565b67ffffffffffffffff6132f4565b60008b81526008602052604081206001908101805467ffffffffffffffff9485167fffffffffffffff00ffffffffffffffffffffffffffffffff000000000000000090911617600360c01b1767ffffffffffffffff60801b1916600160801b4295909516949094029390931790925590547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639841a0189033908e906110ca907f000000000000000000000000000000000000000000000000000000000000000090614a9c565b6040516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915260448201526064016020604051808303816000875af115801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190614afe565b90506001600a60008282546111569190614a54565b9091555050895160008054819061116e908490614b19565b909155505060408a01518a5161118e9167ffffffffffffffff1690614a67565b6005600082825461119f9190614b19565b90915550600090506111b18587614b19565b60095490915060ff166111db5780600160008282546111d09190614a54565b909155506112829050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015611239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125d9190614b2c565b5098506000905061126e828a6132f4565b90508015611280576112808133613977565b505b6040516340c10f1960e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b1580156112ea57600080fd5b505af11580156112fe573d6000803e3d6000fd5b505060095460ff161591505080156113165750868810155b156113245761132487613a12565b8a51600954604080518f815260208101939093528201859052606082018390526080820189905260ff16151560a082015269ffffffffffffffffffff831660c082015233907fe0ae890eaa03f699e40e47e1644539436b9871b84f64d484b069ac9e0e9189149060e00160405180910390a2505050505050505050505050565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b830490931660608401528392916080830190600160c01b900460ff16600381111561141b5761141b614ab0565b600381111561142c5761142c614ab0565b905250905060018160800151600381111561144957611449614ab0565b146114575750600092915050565b600061147661146983600001516134f0565b611471613130565b61354e565b90506000611488600d54600e5461330c565b5090506114a4836040015167ffffffffffffffff1683836134fc565b95945050505050565b60006114b882613a25565b6114c0613aa1565b6114c86136b7565b506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f19337f000000000000000000000000000000000000000000000000000000000000000060015461152a9190614a9c565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160408051808303816000875af1158015611574573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115989190614b5a565b915091506115cb6040805160a0810182526000808252602082018190529181018290526060810182905290608082015290565b8481524267ffffffffffffffff16604082015260016080820181905250600083815260086020908152604091829020835181559083015160018201805493850151606086015167ffffffffffffffff908116600160801b0267ffffffffffffffff60801b19928216600160401b026fffffffffffffffffffffffffffffffff199097169190941617949094179384168217815560808501518594909260ff60c01b191668ffffffffffffffffff60801b1990911617600160c01b83600381111561169757611697614ab0565b0217905550905050846000808282546116b09190614a54565b909155506116c090504286614a67565b600560008282546116d19190614a54565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176d9190614b86565b5061177785613b02565b604080518481526020810187905269ffffffffffffffffffff841681830152905133917ff3305d3ff042bc9868a6e25d2980cb0790e1edd5d6f0a32bb73650bce4926dd2919081900360600190a250909392505050565b6000806117d961314c565b905060006117e6826131e1565b509695505050505050565b6000806117fc6123d2565b9050600081156118ad5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015611866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a9190614ac6565b9050670de0b6b3a764000061189f8285614a67565b6118a99190614a9c565b9150505b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015611914573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119389190614b2c565b509392505050565b604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015260009187917f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90604401602060405180830381865afa1580156119b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d59190614ac6565b1015611a825760405163d505accf60e01b81526001600160a01b038881166004830152306024830152604482018890526064820187905260ff8616608483015260a4820185905260c482018490527f0000000000000000000000000000000000000000000000000000000000000000169063d505accf9060e401600060405180830381600087803b158015611a6957600080fd5b505af1158015611a7d573d6000803e3d6000fd5b505050505b611a8b866114ad565b979650505050505050565b6000600b54600a547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b209190614ac6565b611b2a9190614b19565b611b349190614b19565b905090565b611b41613b96565b611b49613aa1565b611b51613c55565b611b59613d3a565b600080611b64613724565b915091506000805483611b779190614b19565b90506000611b836117f1565b9050611b8e81613e1f565b6000611b9a86846132f4565b9050611ba681856132f4565b9050611bbf8183600154611bba9190614b19565b6132f4565b9050611bca81613ea5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4e9190614ac6565b90506000611c5b82613ef5565b90507f00000000000000000000000000000000000000000000000000000000000000008111611d1d5760405162461bcd60e51b815260206004820152605660248201527f43424d3a204c5553443a334352562065786368616e67652072617465206d757360448201527f74206265206f76657220746865206465706f736974207468726573686f6c642060648201527f6265666f72652053502d3e437572766520736869667400000000000000000000608482015260a4015b60405180910390fd5b611d278330613977565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db29190614ac6565b6040805180820182528681526000602082018190529151630b4c7e4d60e01b81529293506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692630b4c7e4d92611e149291600401614ba8565b6020604051808303816000875af1158015611e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e579190614ac6565b506040516370a0823160e01b815230600482015260009082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611ec1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee59190614ac6565b611eef9190614b19565b9050611efa81613fad565b6000611f0585613ef5565b90508381108015611f3657507f00000000000000000000000000000000000000000000000000000000000000008110155b611fd85760405162461bcd60e51b815260206004820152606160248201527f43424d3a2053502d3e4375727665207368696674206d7573742064656372656160448201527f7365204c5553443a334352562065786368616e6765207261746520746f20612060648201527f76616c75652061626f766520746865206465706f736974207468726573686f6c6084820152601960fa1b60a482015260c401611d14565b5050505050505050505050565b600080611ff184613ea5565b611ffa8461417c565b7f00000000000000000000000000000000000000000000000000000000000000006004546120289190614a54565b4210156120c35760405162461bcd60e51b815260206004820152604f60248201527f43424d3a20526564656d7074696f6e206166746572206669727374206368696360448201527f6b656e20696e206d757374207761697420756e74696c20626f6f74737472617060648201527f20706572696f64206973206f7665720000000000000000000000000000000000608482015260a401611d14565b6000806000806120d161428c565b94509450509350935060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561213a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215e9190614ac6565b6121708a670de0b6b3a7640000614a67565b61217a9190614a9c565b60095490915060009060ff1661219857612193826142bb565b61219b565b60005b905060008080670de0b6b3a76400006121b4868b614a67565b6121be9190614a9c565b90506000670de0b6b3a76400006121d58682614b19565b6121df9084614a67565b6121e99190614a9c565b90506121f58183614b19565b6121ff9085614a54565b935061220b818e61435c565b9250821561221d5761221d8333613977565b506000905086156122b8576000670de0b6b3a764000061223d878b614a67565b6122479190614a9c565b90506000670de0b6b3a764000061225e8782614b19565b6122689084614a67565b6122729190614a9c565b905061227e8183614b19565b6122889086614a54565b945088816003546122999190614a67565b6122a39190614a9c565b925082156122b5576122b533846144cd565b50505b6122c28387614a54565b6001556122d76122d28284614a54565b613ea5565b604051632770a7eb60e21b8152336004820152602481018e90526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561233f57600080fd5b505af1158015612353573d6000803e3d6000fd5b50505050336001600160a01b03167fc0ac8b09f0bc9dd02f48d9145336ab9df1dc378b6115bc78e0f6c3d72bc37b178e8e8585886040516123b6959493929190948552602085019390935260408401919091526060830152608082015260a00190565b60405180910390a29099509750505050505050505b9250929050565b6000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561243b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245f9190614ac6565b60035461246c9190614a67565b611b349190614a9c565b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600c546124c59190614a54565b6124cf9190614a54565b4210156125445760405162461bcd60e51b815260206004820152603560248201527f43424d3a2050726576696f75732073686966742064656c617920616e6420776960448201527f6e646f77206d75737420686176652070617373656400000000000000000000006064820152608401611d14565b42600c55565b6000806125556117f1565b9050600061256161314c565b905061256d8282614a54565b9250505090565b61257c614573565b60095460ff16156125e25760405162461bcd60e51b815260206004820152602a60248201527f43424d3a205265636569766520666565207368617265206f6e6c7920696e206e6044820152696f726d616c206d6f646560b01b6064820152608401611d14565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269b9190614b86565b506126a581613b02565b50565b6000806126b361314c565b905060006126c0826131e1565b50929695505050505050565b6126d4613b96565b6126dc613aa1565b6126e4613c55565b6126ec613d3a565b60006126f66117f1565b9050600061270483836132f4565b905061270f81613ea5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614ac6565b905060006127a0826145f7565b90507f0000000000000000000000000000000000000000000000000000000000000000811161285d5760405162461bcd60e51b815260206004820152605a60248201527f43424d3a20334352563a4c5553442065786368616e67652072617465206d757360448201527f742062652061626f766520746865207769746864726177616c2074687265736860648201527f6f6c64206265666f72652043757276652d3e5350207368696674000000000000608482015260a401611d14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156128c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128e89190614ac6565b9050600085856003546128fb9190614a67565b6129059190614a9c565b9050612910816146af565b6040516370a0823160e01b815230600482015260009083906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299d9190614ac6565b6129a79190614b19565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a359190614ac6565b604051630d2680e960e11b81526004810184905260006024820181905260448201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631a4d01d290606401600060405180830381600087803b158015612aa857600080fd5b505af1158015612abc573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092508391506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612b29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4d9190614ac6565b612b579190614b19565b9050612b6281613b02565b6000612b6d886145f7565b90508681108015612b9e57507f00000000000000000000000000000000000000000000000000000000000000008110155b611fd85760405162461bcd60e51b8152602060048201526064602482018190527f43424d3a2043757276652d3e5350207368696674206d75737420696e6372656160448301527f736520334352563a4c5553442065786368616e6765207261746520746f206120908201527f76616c75652061626f766520746865207769746864726177616c2074687265736084820152631a1bdb1960e21b60a482015260c401611d14565b600080612c4f61314c565b90506000612c5c826131e1565b50919695505050505050565b6000828152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152906080830190600160c01b900460ff166003811115612cdd57612cdd614ab0565b6003811115612cee57612cee614ab0565b9052509050612cfc8361356d565b612d098160800151613656565b612d116136b7565b5060008381526008602052604081206001908101805467ffffffffffffffff4216600160801b0268ffffffffffffffffff60801b1990911617600160c11b179055546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639841a0189033908790612db3907f000000000000000000000000000000000000000000000000000000000000000090614a9c565b6040516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915260448201526064016020604051808303816000875af1158015612e06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e2a9190614afe565b90506001600b6000828254612e3f9190614a54565b90915550508151600080548190612e57908490614b19565b909155505060408201518251612e779167ffffffffffffffff1690614a67565b60056000828254612e889190614b19565b90915550508151600090612e9c908561435c565b9050612ea88133613977565b825160408051878152602081019290925281018590526060810182905269ffffffffffffffffffff8316608082015233907f3bd7a45d09d2d31d78737a80c00ac48ba89dd3cce7537ad56bf1bee66c9dc39e9060a00160405180910390a25050505050565b600080612f1e600d54600e5461330c565b5092915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612faa9190614ac6565b9050600080612fb8856131e1565b5050509150915082600003612fd95750670de0b6b3a7640000949350505050565b82612fe48284614a54565b612ff690670de0b6b3a7640000614a67565b6114a49190614a9c565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152839283928392839283929091906080830190600160c01b900460ff16600381111561308157613081614ab0565b600381111561309257613092614ab0565b8152505090508060000151816020015182604001518360600151846080015160038111156130c2576130c2614ab0565b939b929a50909850965090945092505050565b6130dd614573565b6130e5613aa1565b6009805460ff19166001908117909155546040519081527f6330fd496eb4822cdd507776770666698db359e48ce5a7797a0aaba0c879adca9060200160405180910390a16000600155565b60008061313b61314c565b905061314681612f25565b91505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa1580156131ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131d19190614b2c565b509150506131466002548261474d565b60008060008060008054866131f69190614b19565b92506132006117f1565b600154909250905060006132148385614a54565b90508181111561325157600061322a8383614b19565b9050816132378683614a67565b6132419190614a9c565b965061324d8782614b19565b9550505b5091939590929450565b6000603c6006544261246c9190614b19565b6000631f54050082111561328357631f54050091505b8160000361329a5750670de0b6b3a76400006118ad565b670de0b6b3a764000083835b60018111156132ea576132ba600282614be0565b156132cc576132c9828461475d565b92505b6132d6828361475d565b91506132e3600282614a9c565b90506132a6565b610c3f828461475d565b60008183106133035781613305565b825b9392505050565b6000807f000000000000000000000000000000000000000000000000000000000000000061335a7f000000000000000000000000000000000000000000000000000000000000000042614b19565b6133649190614a9c565b90508281148061339357507f000000000000000000000000000000000000000000000000000000000000000084145b8061339e5750600054155b156133ab578391506123cb565b600080546005546133bc9190614a9c565b9050600061343e7f000000000000000000000000000000000000000000000000000000000000000061340e7f000000000000000000000000000000000000000000000000000000000000000085614a54565b6134189190614b19565b7f0000000000000000000000000000000000000000000000000000000000000000614787565b9050808310156134525785935050506123cb565b600061346886613463600185614b19565b61474d565b6134729085614b19565b90506134e4670de0b6b3a76400006134aa7f00000000000000000000000000000000000000000000000000000000000000008461326d565b6134b4908a614a67565b6134be9190614a9c565b7f000000000000000000000000000000000000000000000000000000000000000061474d565b94505050509250929050565b600080610d4d836137d2565b60008360000361350e57506000613305565b600061351a8542614b19565b61352c90670de0b6b3a7640000614a67565b9050600061353a8483614a54565b6135448387614a67565b610c3f9190614a9c565b60008161356384670de0b6b3a7640000614a67565b6133059190614a9c565b6040516331a9108f60e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156135d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f69190614bf4565b6001600160a01b0316336001600160a01b0316146126a55760405162461bcd60e51b815260206004820152601d60248201527f43424d3a2043616c6c6572206d757374206f776e2074686520626f6e640000006044820152606401611d14565b600181600381111561366a5761366a614ab0565b146126a55760405162461bcd60e51b815260206004820152601860248201527f43424d3a20426f6e64206d7573742062652061637469766500000000000000006044820152606401611d14565b600d54600e546000919082806136cd848461330c565b9150915082811461193857600e81905581841461193857600d8290556040518281527fdf0b753b5dc9a250a9e6268e9c010c895cd12d6e66f6cfb57531a3a49315d09a9060200160405180910390a1509392505050565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015613787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137ab9190614b2c565b506002549092509050808211156137ca57506002819055928392509050565b939092509050565b600954600090819060ff16156137ea57506000929050565b6000670de0b6b3a764000061381f7f000000000000000000000000000000000000000000000000000000000000000086614a67565b6138299190614a9c565b905060006138378286614b19565b91959194509092505050565b600061386f7f000000000000000000000000000000000000000000000000000000000000000085614a54565b4210156138e45760405162461bcd60e51b815260206004820152603e60248201527f43424d3a20466972737420636869636b656e20696e206d75737420776169742060448201527f756e74696c20626f6f74737472617020706572696f64206973206f76657200006064820152608401611d14565b4260045560006138f3846131e1565b5050505090508083101561395e5760405162461bcd60e51b815260206004820152602c60248201527f43424d3a204e6f7420656e6f756768204c55534420617661696c61626c65206960448201526b1b88108b941c9bdd1bd8dbdb60a21b6064820152608401611d14565b801561396d5761396d81613a12565b6114a48184614b19565b604051627b8a6760e11b8152600481018390526001600160a01b0382811660248301527f0000000000000000000000000000000000000000000000000000000000000000169062f714ce90604401600060405180830381600087803b1580156139df57600080fd5b505af11580156139f3573d6000803e3d6000fd5b505050508160026000828254613a099190614b19565b90915550505050565b613a1c8130613977565b6126a5816147b9565b7f00000000000000000000000000000000000000000000000000000000000000008110156126a55760405162461bcd60e51b8152602060048201526024808201527f43424d3a20426f6e64206d696e696d756d20616d6f756e74206e6f742072656160448201526318da195960e21b6064820152608401611d14565b60095460ff1615613b005760405162461bcd60e51b8152602060048201526024808201527f43424d3a204d6967726174696f6e206d757374206265206e6f742062652061636044820152637469766560e01b6064820152608401611d14565b565b60405163b6b55f2560e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f2590602401600060405180830381600087803b158015613b6457600080fd5b505af1158015613b78573d6000803e3d6000fd5b505050508060026000828254613b8e9190614a54565b909155505050565b7f0000000000000000000000000000000000000000000000000000000000000000613be17f000000000000000000000000000000000000000000000000000000000000000042614b19565b1015613b005760405162461bcd60e51b815260206004820152603c60248201527f43424d3a2053686966746572206f6e6c792063616c6c61626c6520616674657260448201527f20736869667420626f6f74737472617020706572696f6420656e6473000000006064820152608401611d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613cb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cd99190614ac6565b11613b005760405162461bcd60e51b815260206004820152602b60248201527f43424d3a20624c55534420537570706c79206d757374206265203e203020757060448201526a6f6e207368696674696e6760a81b6064820152608401611d14565b60007f0000000000000000000000000000000000000000000000000000000000000000600c54613d6a9190614a54565b90506000613d987f000000000000000000000000000000000000000000000000000000000000000083614a54565b9050814210158015613da957508042105b613e1b5760405162461bcd60e51b815260206004820152602f60248201527f43424d3a205368696674206f6e6c7920706f737369626c6520696e736964652060448201527f7368696674696e672077696e646f7700000000000000000000000000000000006064820152608401611d14565b5050565b8060015410156126a55760405162461bcd60e51b8152602060048201526044602482018190527f43424d3a2054686520616d6f756e7420696e2043757276652063616e6e6f7420908201527f62652067726561746572207468616e20746865205065726d616e656e7420627560648201526318dad95d60e21b608482015260a401611d14565b600081116126a55760405162461bcd60e51b815260206004820152601760248201527f43424d3a20416d6f756e74206d757374206265203e20300000000000000000006044820152606401611d14565b604051635e0d443f60e01b815260006004820181905260016024830152670de0b6b3a764000060448301529081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90606401602060405180830381865afa158015613f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f989190614ac6565b9050670de0b6b3a76400006135638483614a67565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140389190614ac6565b60405163b6b55f2560e01b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024016020604051808303816000875af11580156140a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140c69190614ac6565b506040516370a0823160e01b815230600482015260009082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015614130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141549190614ac6565b61415e9190614b19565b905080600360008282546141729190614a54565b9091555050505050565b60095460ff166126a5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142089190614ac6565b6142327f000000000000000000000000000000000000000000000000000000000000000083614a54565b11156126a55760405162461bcd60e51b815260206004820152602360248201527f43424d3a2043616e6e6f742072656465656d2062656c6f77206d696e20737570604482015262706c7960e81b6064820152608401611d14565b60008060008060008061429d613724565b5090506142a9816131e1565b95509550955095509550509091929394565b6000806142c783610b95565b60078190556040518181529091507fe31dea26c34fb8440bf2eec033dfd26bd39e88e026348d996e275a396417109b9060200160405180910390a16000600654426143129190614b19565b9050603c8110612f1e574260068190556040519081527fbab964312bdd13595266f3e549bca3102965a6d718c6c1f8cd7eaac076b9c6c29060200160405180910390a15092915050565b6000818310156143d45760405162461bcd60e51b815260206004820152603460248201527f43424d3a204d696e2076616c75652063616e6e6f74206265206772656174657260448201527f207468616e206e6f6d696e616c20616d6f756e740000000000000000000000006064820152608401611d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015614434573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144589190614b2c565b50915050828110156144c15760405162461bcd60e51b815260206004820152602c60248201527f43424d3a204e6f7420656e6f756768204c55534420617661696c61626c65206960448201526b1b88108b941c9bdd1bd8dbdb60a21b6064820152608401611d14565b60006114a485836132f4565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561453c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145609190614b86565b508060036000828254613a099190614b19565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614613b005760405162461bcd60e51b815260206004820152602360248201527f43424d3a204f6e6c7920596561726e20476f7665726e616e63652063616e2063604482015262185b1b60ea1b6064820152608401611d14565b604051635e0d443f60e01b815260016004820152600060248201819052670de0b6b3a764000060448301529081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90606401602060405180830381865afa158015614676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061469a9190614ac6565b90508261356382670de0b6b3a7640000614a67565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015614716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061473a9190614ac6565b508060036000828254613b8e9190614b19565b6000818310156133035781613305565b6000670de0b6b3a7640000614773600282614a9c565b61477d8486614a67565b6135639190614a54565b60006147938284614be0565b1561479f5760016147a2565b60005b60ff166147af8385614a9c565b6133059190614a54565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148449190614ac6565b6040516393f7aa6760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906393f7aa6790604401600060405180830381600087803b1580156148d357600080fd5b505af11580156148e7573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528492507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015614951573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149759190614ac6565b61497f9083614b19565b14613e1b57613e1b614c11565b60006020828403121561499e57600080fd5b5035919050565b6001600160a01b03811681146126a557600080fd5b60008060008060008060c087890312156149d357600080fd5b86356149de816149a5565b95506020870135945060408701359350606087013560ff81168114614a0257600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215614a2f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808201808211156118ad576118ad614a3e565b6000816000190483118215151615614a8157614a81614a3e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614aab57614aab614a86565b500490565b634e487b7160e01b600052602160045260246000fd5b600060208284031215614ad857600080fd5b5051919050565b805169ffffffffffffffffffff81168114614af957600080fd5b919050565b600060208284031215614b1057600080fd5b61330582614adf565b818103818111156118ad576118ad614a3e565b600080600060608486031215614b4157600080fd5b8351925060208401519150604084015190509250925092565b60008060408385031215614b6d57600080fd5b82519150614b7d60208401614adf565b90509250929050565b600060208284031215614b9857600080fd5b8151801515811461330557600080fd5b60608101818460005b6002811015614bd0578151835260209283019290910190600101614bb1565b5050508260408301529392505050565b600082614bef57614bef614a86565b500690565b600060208284031215614c0657600080fd5b8151613305816149a5565b634e487b7160e01b600052600160045260246000fdfea2646970667358221220d001419fe52aad462621f43bd8569c7642ed84fe14281a399c97b171d83d12c964736f6c63430008100033"; + static readonly abi: ({ + inputs: { + components: { + internalType: string; + name: string; + type: string; + }[]; + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ChickenBondManagerInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ChickenBondManager; +} +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.js new file mode 100644 index 0000000..a0a6b45 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ChickenBondManager__factory.js @@ -0,0 +1,1500 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChickenBondManager__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "bondNFTAddress", + type: "address", + }, + { + internalType: "address", + name: "lusdTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "curvePoolAddress", + type: "address", + }, + { + internalType: "address", + name: "curveBasePoolAddress", + type: "address", + }, + { + internalType: "address", + name: "bammSPVaultAddress", + type: "address", + }, + { + internalType: "address", + name: "yearnCurveVaultAddress", + type: "address", + }, + { + internalType: "address", + name: "yearnRegistryAddress", + type: "address", + }, + { + internalType: "address", + name: "yearnGovernanceAddress", + type: "address", + }, + { + internalType: "address", + name: "bLUSDTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "curveLiquidityGaugeAddress", + type: "address", + }, + ], + internalType: "struct ChickenBondManager.ExternalAdresses", + name: "_externalContractAddresses", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "targetAverageAgeSeconds", + type: "uint256", + }, + { + internalType: "uint256", + name: "initialAccrualParameter", + type: "uint256", + }, + { + internalType: "uint256", + name: "minimumAccrualParameter", + type: "uint256", + }, + { + internalType: "uint256", + name: "accrualAdjustmentRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "accrualAdjustmentPeriodSeconds", + type: "uint256", + }, + { + internalType: "uint256", + name: "chickenInAMMFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "curveDepositDydxThreshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "curveWithdrawalDxdyThreshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "bootstrapPeriodChickenIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "bootstrapPeriodRedeem", + type: "uint256", + }, + { + internalType: "uint256", + name: "bootstrapPeriodShift", + type: "uint256", + }, + { + internalType: "uint256", + name: "shifterDelay", + type: "uint256", + }, + { + internalType: "uint256", + name: "shifterWindow", + type: "uint256", + }, + { + internalType: "uint256", + name: "minBLUSDSupply", + type: "uint256", + }, + { + internalType: "uint256", + name: "minBondAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "nftRandomnessDivisor", + type: "uint256", + }, + { + internalType: "uint256", + name: "redemptionFeeBeta", + type: "uint256", + }, + { + internalType: "uint256", + name: "redemptionFeeMinuteDecayFactor", + type: "uint256", + }, + ], + internalType: "struct ChickenBondManager.Params", + name: "_params", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "accrualParameter", + type: "uint256", + }, + ], + name: "AccrualParameterUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "redeemer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "bLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "minLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "lusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "yTokens", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "redemptionFee", + type: "uint256", + }, + ], + name: "BLUSDRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_baseRedemptionRate", + type: "uint256", + }, + ], + name: "BaseRedemptionRateUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "bonder", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "bondId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "principalLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "minLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "withdrawnLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint80", + name: "bondFinalHalfDna", + type: "uint80", + }, + ], + name: "BondCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "bonder", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "bondId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "lusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "bLusdAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "lusdSurplus", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "chickenInFeeAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "migration", + type: "bool", + }, + { + indexed: false, + internalType: "uint80", + name: "bondFinalHalfDna", + type: "uint80", + }, + ], + name: "BondClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "bonder", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "bondId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint80", + name: "bondInitialHalfDna", + type: "uint80", + }, + ], + name: "BondCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_lastRedemptionFeeOpTime", + type: "uint256", + }, + ], + name: "LastRedemptionTimeUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "previousPermanentLUSD", + type: "uint256", + }, + ], + name: "MigrationTriggered", + type: "event", + }, + { + inputs: [], + name: "BETA", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BOOTSTRAP_PERIOD_CHICKEN_IN", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BOOTSTRAP_PERIOD_REDEEM", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BOOTSTRAP_PERIOD_SHIFT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "CHICKEN_IN_AMM_FEE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DECIMAL_PRECISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "INDEX_OF_LUSD_TOKEN_IN_CURVE_POOL", + outputs: [ + { + internalType: "int128", + name: "", + type: "int128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINUTE_DECAY_FACTOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MIN_BLUSD_SUPPLY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MIN_BOND_AMOUNT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NFT_RANDOMNESS_DIVISOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "SECONDS_IN_ONE_MINUTE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "SHIFTER_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "SHIFTER_WINDOW", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bammLUSDValue", + type: "uint256", + }, + ], + name: "_calcSystemBackingRatioFromBAMMValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accrualAdjustmentMultiplier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accrualAdjustmentPeriodCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accrualAdjustmentPeriodSeconds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accrualParameter", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "activateMigration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "bLUSDToken", + outputs: [ + { + internalType: "contract IBLUSDToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bammSPVault", + outputs: [ + { + internalType: "contract IBAMM", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseRedemptionRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bondNFT", + outputs: [ + { + internalType: "contract IBondNFT", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + ], + name: "calcAccruedBLUSD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + ], + name: "calcBondBLUSDCap", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_fractionOfBLUSDToRedeem", + type: "uint256", + }, + ], + name: "calcRedemptionFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "calcSystemBackingRatio", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "calcTotalLUSDValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "calcTotalYearnCurveVaultShareValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "calcUpdatedAccrualParameter", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + ], + name: "chickenIn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLUSD", + type: "uint256", + }, + ], + name: "chickenOut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "countChickenIn", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "countChickenOut", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lusdAmount", + type: "uint256", + }, + ], + name: "createBond", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "createBondWithPermit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "curveBasePool", + outputs: [ + { + internalType: "contract ICurvePool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveDepositLUSD3CRVExchangeRateThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveLiquidityGauge", + outputs: [ + { + internalType: "contract ICurveLiquidityGaugeV5", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curvePool", + outputs: [ + { + internalType: "contract ICurvePool", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curveWithdrawal3CRVLUSDExchangeRateThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "deploymentTimestamp", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "firstChickenInTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getAcquiredLUSDInCurve", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getAcquiredLUSDInSP", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBAMMLUSDDebt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + ], + name: "getBondData", + outputs: [ + { + internalType: "uint256", + name: "lusdAmount", + type: "uint256", + }, + { + internalType: "uint64", + name: "claimedBLUSD", + type: "uint64", + }, + { + internalType: "uint64", + name: "startTime", + type: "uint64", + }, + { + internalType: "uint64", + name: "endTime", + type: "uint64", + }, + { + internalType: "uint8", + name: "status", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLUSDInBAMMSPVault", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bondID", + type: "uint256", + }, + ], + name: "getLUSDToAcquire", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getOpenBondCount", + outputs: [ + { + internalType: "uint256", + name: "openBondCount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getOwnedLUSDInCurve", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getOwnedLUSDInSP", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingLUSD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPermanentLUSD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalAcquiredLUSD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalLUSDInCurve", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTreasury", + outputs: [ + { + internalType: "uint256", + name: "_pendingLUSD", + type: "uint256", + }, + { + internalType: "uint256", + name: "_totalAcquiredLUSD", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permanentLUSD", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastRedemptionTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastShifterCountdownStartTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lusdToken", + outputs: [ + { + internalType: "contract ILUSDToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "migration", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "minimumAccrualParameter", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_bLUSDToRedeem", + type: "uint256", + }, + { + internalType: "uint256", + name: "_minLUSDFromBAMMSPVault", + type: "uint256", + }, + ], + name: "redeem", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lusdAmount", + type: "uint256", + }, + ], + name: "sendFeeShare", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_maxLUSDToShift", + type: "uint256", + }, + ], + name: "shiftLUSDFromCurveToSP", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_maxLUSDToShift", + type: "uint256", + }, + ], + name: "shiftLUSDFromSPToCurve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "startShifterCountdown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "targetAverageAgeSeconds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalWeightedStartTimes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "yTokensHeldByCBM", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "yearnCurveVault", + outputs: [ + { + internalType: "contract IYearnVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "yearnGovernanceAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "yearnRegistry", + outputs: [ + { + internalType: "contract IYearnRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x6104006040523480156200001257600080fd5b50604051620058b9380380620058b983398101604081905262000035916200070c565b81516001600160a01b039081166080908152602080850151831660c090815261010080870151851660a0908152604080890151871660e090815260608a0151881690935294880151861661012052870151851661014052908601518416610160528501519092166101a052426103605282516103805290820151600d558101516103a08190526200011f5760405162461bcd60e51b815260206004820152602960248201527f43424d3a204d696e206163637275616c20706172616d657465722063616e6e6f60448201526874206265207a65726f60b81b60648201526084015b60405180910390fd5b60608101516200013890670de0b6b3a76400006200082c565b6103c05260808101516103e0526101208201516001600160a01b039081166101805260a08201516101c05260e0516040805163ddca3f4360e01b81529051600093929092169163ddca3f43916004808201926020929091908290030181865afa158015620001aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d0919062000848565b90506402540be400620001e482826200082c565b8360c00151620001f5919062000862565b62000201919062000884565b610320526402540be4006200021782826200082c565b8360e0015162000228919062000862565b62000234919062000884565b610340526101008201516101e052610120820151610200526101408201516102205261016082015161024052610180820151610260526101a0820151610280526101c0820151620002de5760405162461bcd60e51b815260206004820152602d60248201527f43424d3a204d494e20424f4e4420414d4f554e5420706172616d65746572206360448201526c616e6e6f74206265207a65726f60981b606482015260840162000116565b6101c08201516102a0526101e08201516102c0526102008201516102e0526102208201516103005260c0516101205160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200035e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003849190620008a7565b5060c05160e05160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620003dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004029190620008a7565b5060e0516101405160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200045b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004819190620008a7565b5060c0516101805160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620004da573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005009190620008a7565b506101605160e051604051630e177dc760e41b81526001600160a01b03918216600482015291169063e177dc70906024016020604051808303816000875af115801562000551573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005779190620008d2565b6001600160a01b0316610140516001600160a01b0316146200059d576200059d620008f0565b50505062000906565b60405161024081016001600160401b0381118282101715620005d857634e487b7160e01b600052604160045260246000fd5b60405290565b60405161014081016001600160401b0381118282101715620005d857634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200062857600080fd5b919050565b600061024082840312156200064157600080fd5b6200064b620005a6565b825181526020808401519082015260408084015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c080840151908201526101e080840151908201526102008084015190820152610220928301519281019290925250919050565b6000808284036103808112156200072257600080fd5b610140808212156200073357600080fd5b6200073d620005de565b91506200074a8562000610565b82526200075a6020860162000610565b60208301526200076d6040860162000610565b6040830152620007806060860162000610565b6060830152620007936080860162000610565b6080830152620007a660a0860162000610565b60a0830152620007b960c0860162000610565b60c0830152620007cc60e0860162000610565b60e0830152610100620007e181870162000610565b90830152610120620007f586820162000610565b81840152508193506200080b868287016200062d565b925050509250929050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000842576200084262000816565b92915050565b6000602082840312156200085b57600080fd5b5051919050565b60008160001904831182151516156200087f576200087f62000816565b500290565b600082620008a257634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215620008ba57600080fd5b81518015158114620008cb57600080fd5b9392505050565b600060208284031215620008e557600080fd5b620008cb8262000610565b634e487b7160e01b600052600160045260246000fd5b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a0516103c0516103e051614c5d62000c5c6000396000818161044801528181613311015261341a015260008181610b2e0152613485015260008181610a250152818161337101526134c001526000818161052c01526133e90152600081816109d001528181613335015281816133c50152613bbc015260008181610953015281816127a40152612b7b0152600081816108f201528181611c5f0152611f13015260008181610a670152610ba90152600081816104820152610bfc015260008181610712015281816110a5015281816114fe0152612d8e0152600081816108710152613a270152600081816106c4015261420d0152600081816107d6015281816124780152613d73015260008181610794015281816124990152613d3e0152600081816105940152613b980152600081816106eb0152611ffc015260008181610675015261384a01526000818161060501526137fa01526000818161075d015281816125f9015261457e0152600081816104a9015261488d015260006109a9015260008181610a97015281816123df01528181613fc501528181614051015281816140e9015281816144f301526146c501526000818161055c015281816111dd015281816118b8015281816131510152818161372b0152818161399c01528181613b1801526143d80152600081816108c301528181611bce01526127130152600081816105050152818161180a01528181611d3f01528181611de001528181611e7a015281816128750152818161293201528181612a5c01528181613f2d015261462f015260008181610982015281816116f80152818161196a01528181611a250152818161262e015281816129ca01528181612ae2015281816147d10152818161485b01526149010152600081816105d601528181610eda0152818161129e015281816120de015281816122fb01528181612f2a01528181613c59015261418801526000818161092c0152818161106c015281816114ce01528181611aa001528181612d5d01526135830152614c5d6000f3fe608060405234801561001057600080fd5b506004361061043e5760003560e01c80637cbc237311610236578063b83f91a21161013b578063cc0c986e116100c3578063e9dc9e6d11610087578063e9dc9e6d14610b18578063edb134f314610b20578063f1b0cff514610b29578063f3c4023d14610b50578063f58369b914610b5857600080fd5b8063cc0c986e14610a89578063cfc31f6f14610a92578063d2e892dd14610ab9578063da10594314610ac2578063e324634914610b0f57600080fd5b8063c3c297451161010a578063c3c2974514610a0d578063c484cc5f14610a20578063c6c50ce814610a47578063c6d2d26114610a4f578063c7b5548114610a6257600080fd5b8063b83f91a21461097d578063bb870317146109a4578063bfc12c05146109cb578063c0639bbd146109f257600080fd5b8063a21ec280116101be578063acf955c71161018d578063acf955c7146108ed578063aefcc4fd14610914578063b0f3af4714610927578063b23ad3ee1461094e578063b7a65dce1461097557600080fd5b8063a21ec280146108a2578063a79e5683146108b5578063a891c684146108be578063ac8af3a9146108e557600080fd5b806390d532901161020557806390d532901461085357806391dc186f1461085c5780639c283187146108645780639fbc4a5f1461086c578063a20baee61461089357600080fd5b80637cbc23731461081357806384c2dea51461083b5780638ac6e2f4146108435780638caffae11461084b57600080fd5b80634237e191116103475780636350e4b2116102cf578063695e89da11610293578063695e89da146107b65780636a57b253146107be5780636b4fbbed146107d15780636bdac50b146107f85780637b3c7df61461080057600080fd5b80636350e4b2146107455780636381211414610758578063653a81981461077f57806366462ab11461078757806367e48a7e1461078f57600080fd5b80635041382b116103165780635041382b146106bf57806351a643ae146106e6578063570dd5241461070d57806359372e2e1461073457806361ec893d1461073d57600080fd5b80634237e1911461065d5780634903970a146106705780634b10543b146106975780634bb41097146106ac57600080fd5b806335f1d0e0116103ca5780633792dcb9116103995780633792dcb9146105d157806339f01388146105f85780633a517326146106005780633b19e84a146106275780633cbe79261461064a57600080fd5b806335f1d0e014610587578063361628831461058f57806336e2819e146105b657806337303e58146105c957600080fd5b8063218751b211610411578063218751b214610500578063233b0ee71461052757806327fafcd31461054e57806333624a861461055757806335567cda1461057e57600080fd5b80630277407314610443578063071a75411461047d5780630f34d74d146104a45780631705a3bd146104e3575b600080fd5b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610474565b6009546104f09060ff1681565b6040519015158152602001610474565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600a5481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a60035481565b61046a610b61565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6105c436600461498c565b610b95565b61046a610c49565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b60015461046a565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61062f610c6d565b60408051938452602084019290925290820152606001610474565b61046a61065836600461498c565b610c87565b61046a61066b36600461498c565b610d55565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6106aa6106a536600461498c565b610e08565b005b61046a6106ba36600461498c565b6113a4565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a60055481565b61046a603c81565b61046a61075336600461498c565b6114ad565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6117ce565b61046a6117f1565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6118b3565b61046a6107cc3660046149ba565b611940565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a611a96565b6106aa61080e36600461498c565b611b39565b610826610821366004614a1c565b611fe5565b60408051928352602083019190915201610474565b61046a6123d2565b6106aa612476565b60005461046a565b61046a60045481565b61046a61254a565b60025461046a565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a670de0b6b3a764000081565b6106aa6108b036600461498c565b612574565b61046a60075481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a6126a8565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6106aa61092236600461498c565b6126cc565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a612c44565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b6109fa600081565b604051600f9190910b8152602001610474565b6106aa610a1b366004614a1c565b612c68565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a612f0d565b61046a610a5d36600461498c565b612f25565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600d5481565b6104cb7f000000000000000000000000000000000000000000000000000000000000000081565b61046a600c5481565b610ad5610ad036600461498c565b613000565b6040805195865267ffffffffffffffff948516602087015292841692850192909252909116606083015260ff16608082015260a001610474565b61046a60065481565b6106aa6130d5565b61046a600b5481565b61046a7f000000000000000000000000000000000000000000000000000000000000000081565b61046a613130565b61046a600e5481565b600080610b6c61314c565b9050600080610b7a836131e1565b505050915091508082610b8d9190614a54565b935050505090565b600080610ba061325b565b90506000610bce7f00000000000000000000000000000000000000000000000000000000000000008361326d565b90506000670de0b6b3a764000082600754610be99190614a67565b610bf39190614a9c565b90506000610c217f000000000000000000000000000000000000000000000000000000000000000087614a9c565b610c2b9083614a54565b9050610c3f81670de0b6b3a76400006132f4565b9695505050505050565b600080610c5461314c565b90506000610c61826131e1565b50909695505050505050565b600080549080610c7b610b61565b91506001549050909192565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b830490931660608401528392916080830190600160c01b900460ff166003811115610cfe57610cfe614ab0565b6003811115610d0f57610d0f614ab0565b8152505090506000610d25600d54600e5461330c565b509050610d4d826040015167ffffffffffffffff16610d4784600001516134f0565b836134fc565b949350505050565b600080610d60613130565b6000848152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152939450919290916080830190600160c01b900460ff166003811115610ddb57610ddb614ab0565b6003811115610dec57610dec614ab0565b815250509050610d4d610e0282600001516134f0565b8361354e565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152906080830190600160c01b900460ff166003811115610e7d57610e7d614ab0565b6003811115610e8e57610e8e614ab0565b9052509050610e9c8261356d565b610ea98160800151613656565b6000610eb36136b7565b9050600080610ec0613724565b91509150600080610ed486600001516137d2565b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190614ac6565b158015610f6a575060095460ff16155b15610f8b57610f88866040015167ffffffffffffffff168585613843565b92505b6000610fa6876040015167ffffffffffffffff1683886134fc565b90506000610fb386612f25565b9050600081610fca84670de0b6b3a7640000614a67565b610fd49190614a9c565b9050610ff9610feb670de0b6b3a764000083614a9c565b67ffffffffffffffff6132f4565b60008b81526008602052604081206001908101805467ffffffffffffffff9485167fffffffffffffff00ffffffffffffffffffffffffffffffff000000000000000090911617600360c01b1767ffffffffffffffff60801b1916600160801b4295909516949094029390931790925590547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639841a0189033908e906110ca907f000000000000000000000000000000000000000000000000000000000000000090614a9c565b6040516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915260448201526064016020604051808303816000875af115801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190614afe565b90506001600a60008282546111569190614a54565b9091555050895160008054819061116e908490614b19565b909155505060408a01518a5161118e9167ffffffffffffffff1690614a67565b6005600082825461119f9190614b19565b90915550600090506111b18587614b19565b60095490915060ff166111db5780600160008282546111d09190614a54565b909155506112829050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015611239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125d9190614b2c565b5098506000905061126e828a6132f4565b90508015611280576112808133613977565b505b6040516340c10f1960e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b1580156112ea57600080fd5b505af11580156112fe573d6000803e3d6000fd5b505060095460ff161591505080156113165750868810155b156113245761132487613a12565b8a51600954604080518f815260208101939093528201859052606082018390526080820189905260ff16151560a082015269ffffffffffffffffffff831660c082015233907fe0ae890eaa03f699e40e47e1644539436b9871b84f64d484b069ac9e0e9189149060e00160405180910390a2505050505050505050505050565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b830490931660608401528392916080830190600160c01b900460ff16600381111561141b5761141b614ab0565b600381111561142c5761142c614ab0565b905250905060018160800151600381111561144957611449614ab0565b146114575750600092915050565b600061147661146983600001516134f0565b611471613130565b61354e565b90506000611488600d54600e5461330c565b5090506114a4836040015167ffffffffffffffff1683836134fc565b95945050505050565b60006114b882613a25565b6114c0613aa1565b6114c86136b7565b506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f19337f000000000000000000000000000000000000000000000000000000000000000060015461152a9190614a9c565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160408051808303816000875af1158015611574573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115989190614b5a565b915091506115cb6040805160a0810182526000808252602082018190529181018290526060810182905290608082015290565b8481524267ffffffffffffffff16604082015260016080820181905250600083815260086020908152604091829020835181559083015160018201805493850151606086015167ffffffffffffffff908116600160801b0267ffffffffffffffff60801b19928216600160401b026fffffffffffffffffffffffffffffffff199097169190941617949094179384168217815560808501518594909260ff60c01b191668ffffffffffffffffff60801b1990911617600160c01b83600381111561169757611697614ab0565b0217905550905050846000808282546116b09190614a54565b909155506116c090504286614a67565b600560008282546116d19190614a54565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176d9190614b86565b5061177785613b02565b604080518481526020810187905269ffffffffffffffffffff841681830152905133917ff3305d3ff042bc9868a6e25d2980cb0790e1edd5d6f0a32bb73650bce4926dd2919081900360600190a250909392505050565b6000806117d961314c565b905060006117e6826131e1565b509695505050505050565b6000806117fc6123d2565b9050600081156118ad5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015611866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a9190614ac6565b9050670de0b6b3a764000061189f8285614a67565b6118a99190614a9c565b9150505b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015611914573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119389190614b2c565b509392505050565b604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015260009187917f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90604401602060405180830381865afa1580156119b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d59190614ac6565b1015611a825760405163d505accf60e01b81526001600160a01b038881166004830152306024830152604482018890526064820187905260ff8616608483015260a4820185905260c482018490527f0000000000000000000000000000000000000000000000000000000000000000169063d505accf9060e401600060405180830381600087803b158015611a6957600080fd5b505af1158015611a7d573d6000803e3d6000fd5b505050505b611a8b866114ad565b979650505050505050565b6000600b54600a547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b209190614ac6565b611b2a9190614b19565b611b349190614b19565b905090565b611b41613b96565b611b49613aa1565b611b51613c55565b611b59613d3a565b600080611b64613724565b915091506000805483611b779190614b19565b90506000611b836117f1565b9050611b8e81613e1f565b6000611b9a86846132f4565b9050611ba681856132f4565b9050611bbf8183600154611bba9190614b19565b6132f4565b9050611bca81613ea5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4e9190614ac6565b90506000611c5b82613ef5565b90507f00000000000000000000000000000000000000000000000000000000000000008111611d1d5760405162461bcd60e51b815260206004820152605660248201527f43424d3a204c5553443a334352562065786368616e67652072617465206d757360448201527f74206265206f76657220746865206465706f736974207468726573686f6c642060648201527f6265666f72652053502d3e437572766520736869667400000000000000000000608482015260a4015b60405180910390fd5b611d278330613977565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db29190614ac6565b6040805180820182528681526000602082018190529151630b4c7e4d60e01b81529293506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692630b4c7e4d92611e149291600401614ba8565b6020604051808303816000875af1158015611e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e579190614ac6565b506040516370a0823160e01b815230600482015260009082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611ec1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee59190614ac6565b611eef9190614b19565b9050611efa81613fad565b6000611f0585613ef5565b90508381108015611f3657507f00000000000000000000000000000000000000000000000000000000000000008110155b611fd85760405162461bcd60e51b815260206004820152606160248201527f43424d3a2053502d3e4375727665207368696674206d7573742064656372656160448201527f7365204c5553443a334352562065786368616e6765207261746520746f20612060648201527f76616c75652061626f766520746865206465706f736974207468726573686f6c6084820152601960fa1b60a482015260c401611d14565b5050505050505050505050565b600080611ff184613ea5565b611ffa8461417c565b7f00000000000000000000000000000000000000000000000000000000000000006004546120289190614a54565b4210156120c35760405162461bcd60e51b815260206004820152604f60248201527f43424d3a20526564656d7074696f6e206166746572206669727374206368696360448201527f6b656e20696e206d757374207761697420756e74696c20626f6f74737472617060648201527f20706572696f64206973206f7665720000000000000000000000000000000000608482015260a401611d14565b6000806000806120d161428c565b94509450509350935060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561213a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215e9190614ac6565b6121708a670de0b6b3a7640000614a67565b61217a9190614a9c565b60095490915060009060ff1661219857612193826142bb565b61219b565b60005b905060008080670de0b6b3a76400006121b4868b614a67565b6121be9190614a9c565b90506000670de0b6b3a76400006121d58682614b19565b6121df9084614a67565b6121e99190614a9c565b90506121f58183614b19565b6121ff9085614a54565b935061220b818e61435c565b9250821561221d5761221d8333613977565b506000905086156122b8576000670de0b6b3a764000061223d878b614a67565b6122479190614a9c565b90506000670de0b6b3a764000061225e8782614b19565b6122689084614a67565b6122729190614a9c565b905061227e8183614b19565b6122889086614a54565b945088816003546122999190614a67565b6122a39190614a9c565b925082156122b5576122b533846144cd565b50505b6122c28387614a54565b6001556122d76122d28284614a54565b613ea5565b604051632770a7eb60e21b8152336004820152602481018e90526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561233f57600080fd5b505af1158015612353573d6000803e3d6000fd5b50505050336001600160a01b03167fc0ac8b09f0bc9dd02f48d9145336ab9df1dc378b6115bc78e0f6c3d72bc37b178e8e8585886040516123b6959493929190948552602085019390935260408401919091526060830152608082015260a00190565b60405180910390a29099509750505050505050505b9250929050565b6000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561243b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245f9190614ac6565b60035461246c9190614a67565b611b349190614a9c565b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600c546124c59190614a54565b6124cf9190614a54565b4210156125445760405162461bcd60e51b815260206004820152603560248201527f43424d3a2050726576696f75732073686966742064656c617920616e6420776960448201527f6e646f77206d75737420686176652070617373656400000000000000000000006064820152608401611d14565b42600c55565b6000806125556117f1565b9050600061256161314c565b905061256d8282614a54565b9250505090565b61257c614573565b60095460ff16156125e25760405162461bcd60e51b815260206004820152602a60248201527f43424d3a205265636569766520666565207368617265206f6e6c7920696e206e6044820152696f726d616c206d6f646560b01b6064820152608401611d14565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269b9190614b86565b506126a581613b02565b50565b6000806126b361314c565b905060006126c0826131e1565b50929695505050505050565b6126d4613b96565b6126dc613aa1565b6126e4613c55565b6126ec613d3a565b60006126f66117f1565b9050600061270483836132f4565b905061270f81613ea5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614ac6565b905060006127a0826145f7565b90507f0000000000000000000000000000000000000000000000000000000000000000811161285d5760405162461bcd60e51b815260206004820152605a60248201527f43424d3a20334352563a4c5553442065786368616e67652072617465206d757360448201527f742062652061626f766520746865207769746864726177616c2074687265736860648201527f6f6c64206265666f72652043757276652d3e5350207368696674000000000000608482015260a401611d14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156128c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128e89190614ac6565b9050600085856003546128fb9190614a67565b6129059190614a9c565b9050612910816146af565b6040516370a0823160e01b815230600482015260009083906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299d9190614ac6565b6129a79190614b19565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a359190614ac6565b604051630d2680e960e11b81526004810184905260006024820181905260448201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631a4d01d290606401600060405180830381600087803b158015612aa857600080fd5b505af1158015612abc573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092508391506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612b29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4d9190614ac6565b612b579190614b19565b9050612b6281613b02565b6000612b6d886145f7565b90508681108015612b9e57507f00000000000000000000000000000000000000000000000000000000000000008110155b611fd85760405162461bcd60e51b8152602060048201526064602482018190527f43424d3a2043757276652d3e5350207368696674206d75737420696e6372656160448301527f736520334352563a4c5553442065786368616e6765207261746520746f206120908201527f76616c75652061626f766520746865207769746864726177616c2074687265736084820152631a1bdb1960e21b60a482015260c401611d14565b600080612c4f61314c565b90506000612c5c826131e1565b50919695505050505050565b6000828152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152906080830190600160c01b900460ff166003811115612cdd57612cdd614ab0565b6003811115612cee57612cee614ab0565b9052509050612cfc8361356d565b612d098160800151613656565b612d116136b7565b5060008381526008602052604081206001908101805467ffffffffffffffff4216600160801b0268ffffffffffffffffff60801b1990911617600160c11b179055546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639841a0189033908790612db3907f000000000000000000000000000000000000000000000000000000000000000090614a9c565b6040516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915260448201526064016020604051808303816000875af1158015612e06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e2a9190614afe565b90506001600b6000828254612e3f9190614a54565b90915550508151600080548190612e57908490614b19565b909155505060408201518251612e779167ffffffffffffffff1690614a67565b60056000828254612e889190614b19565b90915550508151600090612e9c908561435c565b9050612ea88133613977565b825160408051878152602081019290925281018590526060810182905269ffffffffffffffffffff8316608082015233907f3bd7a45d09d2d31d78737a80c00ac48ba89dd3cce7537ad56bf1bee66c9dc39e9060a00160405180910390a25050505050565b600080612f1e600d54600e5461330c565b5092915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612faa9190614ac6565b9050600080612fb8856131e1565b5050509150915082600003612fd95750670de0b6b3a7640000949350505050565b82612fe48284614a54565b612ff690670de0b6b3a7640000614a67565b6114a49190614a9c565b6000818152600860209081526040808320815160a08101835281548152600182015467ffffffffffffffff80821695830195909552600160401b8104851693820193909352600160801b83049093166060840152839283928392839283929091906080830190600160c01b900460ff16600381111561308157613081614ab0565b600381111561309257613092614ab0565b8152505090508060000151816020015182604001518360600151846080015160038111156130c2576130c2614ab0565b939b929a50909850965090945092505050565b6130dd614573565b6130e5613aa1565b6009805460ff19166001908117909155546040519081527f6330fd496eb4822cdd507776770666698db359e48ce5a7797a0aaba0c879adca9060200160405180910390a16000600155565b60008061313b61314c565b905061314681612f25565b91505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa1580156131ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131d19190614b2c565b509150506131466002548261474d565b60008060008060008054866131f69190614b19565b92506132006117f1565b600154909250905060006132148385614a54565b90508181111561325157600061322a8383614b19565b9050816132378683614a67565b6132419190614a9c565b965061324d8782614b19565b9550505b5091939590929450565b6000603c6006544261246c9190614b19565b6000631f54050082111561328357631f54050091505b8160000361329a5750670de0b6b3a76400006118ad565b670de0b6b3a764000083835b60018111156132ea576132ba600282614be0565b156132cc576132c9828461475d565b92505b6132d6828361475d565b91506132e3600282614a9c565b90506132a6565b610c3f828461475d565b60008183106133035781613305565b825b9392505050565b6000807f000000000000000000000000000000000000000000000000000000000000000061335a7f000000000000000000000000000000000000000000000000000000000000000042614b19565b6133649190614a9c565b90508281148061339357507f000000000000000000000000000000000000000000000000000000000000000084145b8061339e5750600054155b156133ab578391506123cb565b600080546005546133bc9190614a9c565b9050600061343e7f000000000000000000000000000000000000000000000000000000000000000061340e7f000000000000000000000000000000000000000000000000000000000000000085614a54565b6134189190614b19565b7f0000000000000000000000000000000000000000000000000000000000000000614787565b9050808310156134525785935050506123cb565b600061346886613463600185614b19565b61474d565b6134729085614b19565b90506134e4670de0b6b3a76400006134aa7f00000000000000000000000000000000000000000000000000000000000000008461326d565b6134b4908a614a67565b6134be9190614a9c565b7f000000000000000000000000000000000000000000000000000000000000000061474d565b94505050509250929050565b600080610d4d836137d2565b60008360000361350e57506000613305565b600061351a8542614b19565b61352c90670de0b6b3a7640000614a67565b9050600061353a8483614a54565b6135448387614a67565b610c3f9190614a9c565b60008161356384670de0b6b3a7640000614a67565b6133059190614a9c565b6040516331a9108f60e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156135d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f69190614bf4565b6001600160a01b0316336001600160a01b0316146126a55760405162461bcd60e51b815260206004820152601d60248201527f43424d3a2043616c6c6572206d757374206f776e2074686520626f6e640000006044820152606401611d14565b600181600381111561366a5761366a614ab0565b146126a55760405162461bcd60e51b815260206004820152601860248201527f43424d3a20426f6e64206d7573742062652061637469766500000000000000006044820152606401611d14565b600d54600e546000919082806136cd848461330c565b9150915082811461193857600e81905581841461193857600d8290556040518281527fdf0b753b5dc9a250a9e6268e9c010c895cd12d6e66f6cfb57531a3a49315d09a9060200160405180910390a1509392505050565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015613787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137ab9190614b2c565b506002549092509050808211156137ca57506002819055928392509050565b939092509050565b600954600090819060ff16156137ea57506000929050565b6000670de0b6b3a764000061381f7f000000000000000000000000000000000000000000000000000000000000000086614a67565b6138299190614a9c565b905060006138378286614b19565b91959194509092505050565b600061386f7f000000000000000000000000000000000000000000000000000000000000000085614a54565b4210156138e45760405162461bcd60e51b815260206004820152603e60248201527f43424d3a20466972737420636869636b656e20696e206d75737420776169742060448201527f756e74696c20626f6f74737472617020706572696f64206973206f76657200006064820152608401611d14565b4260045560006138f3846131e1565b5050505090508083101561395e5760405162461bcd60e51b815260206004820152602c60248201527f43424d3a204e6f7420656e6f756768204c55534420617661696c61626c65206960448201526b1b88108b941c9bdd1bd8dbdb60a21b6064820152608401611d14565b801561396d5761396d81613a12565b6114a48184614b19565b604051627b8a6760e11b8152600481018390526001600160a01b0382811660248301527f0000000000000000000000000000000000000000000000000000000000000000169062f714ce90604401600060405180830381600087803b1580156139df57600080fd5b505af11580156139f3573d6000803e3d6000fd5b505050508160026000828254613a099190614b19565b90915550505050565b613a1c8130613977565b6126a5816147b9565b7f00000000000000000000000000000000000000000000000000000000000000008110156126a55760405162461bcd60e51b8152602060048201526024808201527f43424d3a20426f6e64206d696e696d756d20616d6f756e74206e6f742072656160448201526318da195960e21b6064820152608401611d14565b60095460ff1615613b005760405162461bcd60e51b8152602060048201526024808201527f43424d3a204d6967726174696f6e206d757374206265206e6f742062652061636044820152637469766560e01b6064820152608401611d14565b565b60405163b6b55f2560e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f2590602401600060405180830381600087803b158015613b6457600080fd5b505af1158015613b78573d6000803e3d6000fd5b505050508060026000828254613b8e9190614a54565b909155505050565b7f0000000000000000000000000000000000000000000000000000000000000000613be17f000000000000000000000000000000000000000000000000000000000000000042614b19565b1015613b005760405162461bcd60e51b815260206004820152603c60248201527f43424d3a2053686966746572206f6e6c792063616c6c61626c6520616674657260448201527f20736869667420626f6f74737472617020706572696f6420656e6473000000006064820152608401611d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613cb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cd99190614ac6565b11613b005760405162461bcd60e51b815260206004820152602b60248201527f43424d3a20624c55534420537570706c79206d757374206265203e203020757060448201526a6f6e207368696674696e6760a81b6064820152608401611d14565b60007f0000000000000000000000000000000000000000000000000000000000000000600c54613d6a9190614a54565b90506000613d987f000000000000000000000000000000000000000000000000000000000000000083614a54565b9050814210158015613da957508042105b613e1b5760405162461bcd60e51b815260206004820152602f60248201527f43424d3a205368696674206f6e6c7920706f737369626c6520696e736964652060448201527f7368696674696e672077696e646f7700000000000000000000000000000000006064820152608401611d14565b5050565b8060015410156126a55760405162461bcd60e51b8152602060048201526044602482018190527f43424d3a2054686520616d6f756e7420696e2043757276652063616e6e6f7420908201527f62652067726561746572207468616e20746865205065726d616e656e7420627560648201526318dad95d60e21b608482015260a401611d14565b600081116126a55760405162461bcd60e51b815260206004820152601760248201527f43424d3a20416d6f756e74206d757374206265203e20300000000000000000006044820152606401611d14565b604051635e0d443f60e01b815260006004820181905260016024830152670de0b6b3a764000060448301529081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90606401602060405180830381865afa158015613f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f989190614ac6565b9050670de0b6b3a76400006135638483614a67565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140389190614ac6565b60405163b6b55f2560e01b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024016020604051808303816000875af11580156140a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140c69190614ac6565b506040516370a0823160e01b815230600482015260009082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015614130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141549190614ac6565b61415e9190614b19565b905080600360008282546141729190614a54565b9091555050505050565b60095460ff166126a5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142089190614ac6565b6142327f000000000000000000000000000000000000000000000000000000000000000083614a54565b11156126a55760405162461bcd60e51b815260206004820152602360248201527f43424d3a2043616e6e6f742072656465656d2062656c6f77206d696e20737570604482015262706c7960e81b6064820152608401611d14565b60008060008060008061429d613724565b5090506142a9816131e1565b95509550955095509550509091929394565b6000806142c783610b95565b60078190556040518181529091507fe31dea26c34fb8440bf2eec033dfd26bd39e88e026348d996e275a396417109b9060200160405180910390a16000600654426143129190614b19565b9050603c8110612f1e574260068190556040519081527fbab964312bdd13595266f3e549bca3102965a6d718c6c1f8cd7eaac076b9c6c29060200160405180910390a15092915050565b6000818310156143d45760405162461bcd60e51b815260206004820152603460248201527f43424d3a204d696e2076616c75652063616e6e6f74206265206772656174657260448201527f207468616e206e6f6d696e616c20616d6f756e740000000000000000000000006064820152608401611d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bfca6c116040518163ffffffff1660e01b8152600401606060405180830381865afa158015614434573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144589190614b2c565b50915050828110156144c15760405162461bcd60e51b815260206004820152602c60248201527f43424d3a204e6f7420656e6f756768204c55534420617661696c61626c65206960448201526b1b88108b941c9bdd1bd8dbdb60a21b6064820152608401611d14565b60006114a485836132f4565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561453c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145609190614b86565b508060036000828254613a099190614b19565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614613b005760405162461bcd60e51b815260206004820152602360248201527f43424d3a204f6e6c7920596561726e20476f7665726e616e63652063616e2063604482015262185b1b60ea1b6064820152608401611d14565b604051635e0d443f60e01b815260016004820152600060248201819052670de0b6b3a764000060448301529081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90606401602060405180830381865afa158015614676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061469a9190614ac6565b90508261356382670de0b6b3a7640000614a67565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024016020604051808303816000875af1158015614716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061473a9190614ac6565b508060036000828254613b8e9190614b19565b6000818310156133035781613305565b6000670de0b6b3a7640000614773600282614a9c565b61477d8486614a67565b6135639190614a54565b60006147938284614be0565b1561479f5760016147a2565b60005b60ff166147af8385614a9c565b6133059190614a54565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148449190614ac6565b6040516393f7aa6760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906393f7aa6790604401600060405180830381600087803b1580156148d357600080fd5b505af11580156148e7573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528492507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015614951573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149759190614ac6565b61497f9083614b19565b14613e1b57613e1b614c11565b60006020828403121561499e57600080fd5b5035919050565b6001600160a01b03811681146126a557600080fd5b60008060008060008060c087890312156149d357600080fd5b86356149de816149a5565b95506020870135945060408701359350606087013560ff81168114614a0257600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215614a2f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808201808211156118ad576118ad614a3e565b6000816000190483118215151615614a8157614a81614a3e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614aab57614aab614a86565b500490565b634e487b7160e01b600052602160045260246000fd5b600060208284031215614ad857600080fd5b5051919050565b805169ffffffffffffffffffff81168114614af957600080fd5b919050565b600060208284031215614b1057600080fd5b61330582614adf565b818103818111156118ad576118ad614a3e565b600080600060608486031215614b4157600080fd5b8351925060208401519150604084015190509250925092565b60008060408385031215614b6d57600080fd5b82519150614b7d60208401614adf565b90509250929050565b600060208284031215614b9857600080fd5b8151801515811461330557600080fd5b60608101818460005b6002811015614bd0578151835260209283019290910190600101614bb1565b5050508260408301529392505050565b600082614bef57614bef614a86565b500690565b600060208284031215614c0657600080fd5b8151613305816149a5565b634e487b7160e01b600052600160045260246000fdfea2646970667358221220d001419fe52aad462621f43bd8569c7642ed84fe14281a399c97b171d83d12c964736f6c63430008100033"; +const isSuperArgs = (xs) => xs.length > 1; +class ChickenBondManager__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(_externalContractAddresses, _params, overrides) { + return super.deploy(_externalContractAddresses, _params, overrides || {}); + } + getDeployTransaction(_externalContractAddresses, _params, overrides) { + return super.getDeployTransaction(_externalContractAddresses, _params, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ChickenBondManager__factory = ChickenBondManager__factory; +ChickenBondManager__factory.bytecode = _bytecode; +ChickenBondManager__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.d.ts new file mode 100644 index 0000000..50ced4c --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, BigNumberish, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ERC20Faucet, ERC20FaucetInterface } from "../ERC20Faucet"; +declare type ERC20FaucetConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ERC20Faucet__factory extends ContractFactory { + constructor(...args: ERC20FaucetConstructorParams); + deploy(_name: string, _symbol: string, _tapAmount: BigNumberish, _tapPeriod: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(_name: string, _symbol: string, _tapAmount: BigNumberish, _tapPeriod: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ERC20Faucet; + connect(signer: Signer): ERC20Faucet__factory; + static readonly bytecode = "0x6101806040523480156200001257600080fd5b506040516200192c3803806200192c83398101604081905262000035916200023a565b6040805180820190915260018152603160f81b6020820152849081908186600362000061838262000343565b50600462000070828262000343565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919096012090529290925261012052506200010f90503362000123565b6101409190915261016052506200040f9050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019d57600080fd5b81516001600160401b0380821115620001ba57620001ba62000175565b604051601f8301601f19908116603f01168101908282118183101715620001e557620001e562000175565b816040528381526020925086838588010111156200020257600080fd5b600091505b8382101562000226578582018301518183018401529082019062000207565b600093810190920192909252949350505050565b600080600080608085870312156200025157600080fd5b84516001600160401b03808211156200026957600080fd5b62000277888389016200018b565b955060208701519150808211156200028e57600080fd5b506200029d878288016200018b565b604087015160609097015195989097509350505050565b600181811c90821680620002c957607f821691505b602082108103620002ea57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033e57600081815260208120601f850160051c81016020861015620003195750805b601f850160051c820191505b818110156200033a5782815560010162000325565b5050505b505050565b81516001600160401b038111156200035f576200035f62000175565b6200037781620003708454620002b4565b84620002f0565b602080601f831160018114620003af5760008415620003965750858301515b600019600386901b1c1916600185901b1785556200033a565b600085815260208120601f198616915b82811015620003e057888601518255948401946001909101908401620003bf565b5085821015620003ff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161014051610160516114a9620004836000396000818161029c0152610f45015260008181610231015261086d01526000610cb101526000610d0001526000610cdb01526000610c3401526000610c5e01526000610c8801526114a96000f3fe608060405234801561001057600080fd5b50600436106101625760003560e01c8063715018a6116100c8578063a457c2d71161008c578063dd62ed3e11610066578063dd62ed3e1461031a578063f2fde38b14610353578063fd2210311461036657600080fd5b8063a457c2d7146102e1578063a9059cbb146102f4578063d505accf1461030757600080fd5b8063715018a61461027c5780637ecebe0014610284578063844c827a146102975780638da5cb5b146102be57806395d89b41146102d957600080fd5b80633644e5151161012a5780634865701b116101045780634865701b1461020c578063542522071461022c57806370a082311461025357600080fd5b80633644e515146101dc57806339509351146101e457806340c10f19146101f757600080fd5b806306fdde0314610167578063095ea7b31461018557806318160ddd146101a857806323b872dd146101ba578063313ce567146101cd575b600080fd5b61016f61036e565b60405161017c9190611270565b60405180910390f35b6101986101933660046112da565b610400565b604051901515815260200161017c565b6002545b60405190815260200161017c565b6101986101c8366004611304565b61041a565b6040516012815260200161017c565b6101ac61043e565b6101986101f23660046112da565b61044d565b61020a6102053660046112da565b61048c565b005b6101ac61021a366004611340565b60086020526000908152604090205481565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101ac610261366004611340565b6001600160a01b031660009081526020819052604090205490565b61020a6104f9565b6101ac610292366004611340565b61055f565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6007546040516001600160a01b03909116815260200161017c565b61016f61057d565b6101986102ef3660046112da565b61058c565b6101986103023660046112da565b61061e565b61020a610315366004611362565b61062c565b6101ac6103283660046113d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61020a610361366004611340565b610790565b61020a61085b565b60606003805461037d90611408565b80601f01602080910402602001604051908101604052809291908181526020018280546103a990611408565b80156103f65780601f106103cb576101008083540402835291602001916103f6565b820191906000526020600020905b8154815290600101906020018083116103d957829003601f168201915b5050505050905090565b60003361040e8185856108a3565b60019150505b92915050565b6000336104288582856109c7565b610433858585610a59565b506001949350505050565b6000610448610c27565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061040e908290869061048790879061143c565b6108a3565b6007546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6104f58282610d51565b5050565b6007546001600160a01b031633146105535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b61055d6000610e30565b565b6001600160a01b038116600090815260056020526040812054610414565b60606004805461037d90611408565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156106115760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104e2565b61043382868684036108a3565b60003361040e818585610a59565b8342111561067c5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104e2565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886106ab8c610e8f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061070682610eb7565b9050600061071682878787610f05565b9050896001600160a01b0316816001600160a01b0316146107795760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104e2565b6107848a8a8a6108a3565b50505050505050505050565b6007546001600160a01b031633146107ea5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6001600160a01b03811661084f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e2565b61085881610e30565b50565b6000610865610f2d565b9050610891337f0000000000000000000000000000000000000000000000000000000000000000610d51565b33600090815260086020526040902055565b6001600160a01b0383166109055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104e2565b6001600160a01b0382166109665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104e2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610a535781811015610a465760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104e2565b610a5384848484036108a3565b50505050565b6001600160a01b038316610abd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104e2565b6001600160a01b038216610b1f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104e2565b6001600160a01b03831660009081526020819052604090205481811015610b975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104e2565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610bce90849061143c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c1a91815260200190565b60405180910390a3610a53565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610c8057507f000000000000000000000000000000000000000000000000000000000000000046145b15610caa57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b6001600160a01b038216610da75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104e2565b8060026000828254610db9919061143c565b90915550506001600160a01b03821660009081526020819052604081208054839290610de690849061143c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b6000610414610ec4610c27565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000610f1687878787610fcd565b91509150610f23816110ba565b5095945050505050565b336000908152600860205260409020544290610f6a907f00000000000000000000000000000000000000000000000000000000000000009061143c565b811015610d4e5760405162461bcd60e51b815260206004820152602b60248201527f45524332304661756365743a206d7573742077616974206265666f726520746160448201526a383834b7339030b3b0b4b760a91b60648201526084016104e2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561100457506000905060036110b1565b8460ff16601b1415801561101c57508460ff16601c14155b1561102d57506000905060046110b1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611081573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110aa576000600192509250506110b1565b9150600090505b94509492505050565b60008160048111156110ce576110ce61145d565b036110d65750565b60018160048111156110ea576110ea61145d565b036111375760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104e2565b600281600481111561114b5761114b61145d565b036111985760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104e2565b60038160048111156111ac576111ac61145d565b036112045760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104e2565b60048160048111156112185761121861145d565b036108585760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104e2565b600060208083528351808285015260005b8181101561129d57858101830151858201604001528201611281565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146112d557600080fd5b919050565b600080604083850312156112ed57600080fd5b6112f6836112be565b946020939093013593505050565b60008060006060848603121561131957600080fd5b611322846112be565b9250611330602085016112be565b9150604084013590509250925092565b60006020828403121561135257600080fd5b61135b826112be565b9392505050565b600080600080600080600060e0888a03121561137d57600080fd5b611386886112be565b9650611394602089016112be565b95506040880135945060608801359350608088013560ff811681146113b857600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156113e857600080fd5b6113f1836112be565b91506113ff602084016112be565b90509250929050565b600181811c9082168061141c57607f821691505b602082108103610eb157634e487b7160e01b600052602260045260246000fd5b8082018082111561041457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea264697066735822122031bad1aad7c87dcb56c198f81a0e4285d52ffb41d8f451180fdaf1694d94639564736f6c63430008100033"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ERC20FaucetInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ERC20Faucet; +} +export {}; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.js new file mode 100644 index 0000000..1b62cff --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/ERC20Faucet__factory.js @@ -0,0 +1,535 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ERC20Faucet__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + { + internalType: "uint256", + name: "_tapAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_tapPeriod", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "lastTapped", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tap", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tapAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tapPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x6101806040523480156200001257600080fd5b506040516200192c3803806200192c83398101604081905262000035916200023a565b6040805180820190915260018152603160f81b6020820152849081908186600362000061838262000343565b50600462000070828262000343565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919096012090529290925261012052506200010f90503362000123565b6101409190915261016052506200040f9050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019d57600080fd5b81516001600160401b0380821115620001ba57620001ba62000175565b604051601f8301601f19908116603f01168101908282118183101715620001e557620001e562000175565b816040528381526020925086838588010111156200020257600080fd5b600091505b8382101562000226578582018301518183018401529082019062000207565b600093810190920192909252949350505050565b600080600080608085870312156200025157600080fd5b84516001600160401b03808211156200026957600080fd5b62000277888389016200018b565b955060208701519150808211156200028e57600080fd5b506200029d878288016200018b565b604087015160609097015195989097509350505050565b600181811c90821680620002c957607f821691505b602082108103620002ea57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033e57600081815260208120601f850160051c81016020861015620003195750805b601f850160051c820191505b818110156200033a5782815560010162000325565b5050505b505050565b81516001600160401b038111156200035f576200035f62000175565b6200037781620003708454620002b4565b84620002f0565b602080601f831160018114620003af5760008415620003965750858301515b600019600386901b1c1916600185901b1785556200033a565b600085815260208120601f198616915b82811015620003e057888601518255948401946001909101908401620003bf565b5085821015620003ff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161014051610160516114a9620004836000396000818161029c0152610f45015260008181610231015261086d01526000610cb101526000610d0001526000610cdb01526000610c3401526000610c5e01526000610c8801526114a96000f3fe608060405234801561001057600080fd5b50600436106101625760003560e01c8063715018a6116100c8578063a457c2d71161008c578063dd62ed3e11610066578063dd62ed3e1461031a578063f2fde38b14610353578063fd2210311461036657600080fd5b8063a457c2d7146102e1578063a9059cbb146102f4578063d505accf1461030757600080fd5b8063715018a61461027c5780637ecebe0014610284578063844c827a146102975780638da5cb5b146102be57806395d89b41146102d957600080fd5b80633644e5151161012a5780634865701b116101045780634865701b1461020c578063542522071461022c57806370a082311461025357600080fd5b80633644e515146101dc57806339509351146101e457806340c10f19146101f757600080fd5b806306fdde0314610167578063095ea7b31461018557806318160ddd146101a857806323b872dd146101ba578063313ce567146101cd575b600080fd5b61016f61036e565b60405161017c9190611270565b60405180910390f35b6101986101933660046112da565b610400565b604051901515815260200161017c565b6002545b60405190815260200161017c565b6101986101c8366004611304565b61041a565b6040516012815260200161017c565b6101ac61043e565b6101986101f23660046112da565b61044d565b61020a6102053660046112da565b61048c565b005b6101ac61021a366004611340565b60086020526000908152604090205481565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101ac610261366004611340565b6001600160a01b031660009081526020819052604090205490565b61020a6104f9565b6101ac610292366004611340565b61055f565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6007546040516001600160a01b03909116815260200161017c565b61016f61057d565b6101986102ef3660046112da565b61058c565b6101986103023660046112da565b61061e565b61020a610315366004611362565b61062c565b6101ac6103283660046113d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61020a610361366004611340565b610790565b61020a61085b565b60606003805461037d90611408565b80601f01602080910402602001604051908101604052809291908181526020018280546103a990611408565b80156103f65780601f106103cb576101008083540402835291602001916103f6565b820191906000526020600020905b8154815290600101906020018083116103d957829003601f168201915b5050505050905090565b60003361040e8185856108a3565b60019150505b92915050565b6000336104288582856109c7565b610433858585610a59565b506001949350505050565b6000610448610c27565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061040e908290869061048790879061143c565b6108a3565b6007546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6104f58282610d51565b5050565b6007546001600160a01b031633146105535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b61055d6000610e30565b565b6001600160a01b038116600090815260056020526040812054610414565b60606004805461037d90611408565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156106115760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104e2565b61043382868684036108a3565b60003361040e818585610a59565b8342111561067c5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104e2565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886106ab8c610e8f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061070682610eb7565b9050600061071682878787610f05565b9050896001600160a01b0316816001600160a01b0316146107795760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104e2565b6107848a8a8a6108a3565b50505050505050505050565b6007546001600160a01b031633146107ea5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6001600160a01b03811661084f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e2565b61085881610e30565b50565b6000610865610f2d565b9050610891337f0000000000000000000000000000000000000000000000000000000000000000610d51565b33600090815260086020526040902055565b6001600160a01b0383166109055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104e2565b6001600160a01b0382166109665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104e2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610a535781811015610a465760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104e2565b610a5384848484036108a3565b50505050565b6001600160a01b038316610abd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104e2565b6001600160a01b038216610b1f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104e2565b6001600160a01b03831660009081526020819052604090205481811015610b975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104e2565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610bce90849061143c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c1a91815260200190565b60405180910390a3610a53565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610c8057507f000000000000000000000000000000000000000000000000000000000000000046145b15610caa57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b6001600160a01b038216610da75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104e2565b8060026000828254610db9919061143c565b90915550506001600160a01b03821660009081526020819052604081208054839290610de690849061143c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b6000610414610ec4610c27565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000610f1687878787610fcd565b91509150610f23816110ba565b5095945050505050565b336000908152600860205260409020544290610f6a907f00000000000000000000000000000000000000000000000000000000000000009061143c565b811015610d4e5760405162461bcd60e51b815260206004820152602b60248201527f45524332304661756365743a206d7573742077616974206265666f726520746160448201526a383834b7339030b3b0b4b760a91b60648201526084016104e2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561100457506000905060036110b1565b8460ff16601b1415801561101c57508460ff16601c14155b1561102d57506000905060046110b1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611081573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110aa576000600192509250506110b1565b9150600090505b94509492505050565b60008160048111156110ce576110ce61145d565b036110d65750565b60018160048111156110ea576110ea61145d565b036111375760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104e2565b600281600481111561114b5761114b61145d565b036111985760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104e2565b60038160048111156111ac576111ac61145d565b036112045760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104e2565b60048160048111156112185761121861145d565b036108585760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104e2565b600060208083528351808285015260005b8181101561129d57858101830151858201604001528201611281565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146112d557600080fd5b919050565b600080604083850312156112ed57600080fd5b6112f6836112be565b946020939093013593505050565b60008060006060848603121561131957600080fd5b611322846112be565b9250611330602085016112be565b9150604084013590509250925092565b60006020828403121561135257600080fd5b61135b826112be565b9392505050565b600080600080600080600060e0888a03121561137d57600080fd5b611386886112be565b9650611394602089016112be565b95506040880135945060608801359350608088013560ff811681146113b857600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156113e857600080fd5b6113f1836112be565b91506113ff602084016112be565b90509250929050565b600181811c9082168061141c57607f821691505b602082108103610eb157634e487b7160e01b600052602260045260246000fd5b8082018082111561041457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea264697066735822122031bad1aad7c87dcb56c198f81a0e4285d52ffb41d8f451180fdaf1694d94639564736f6c63430008100033"; +const isSuperArgs = (xs) => xs.length > 1; +class ERC20Faucet__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(_name, _symbol, _tapAmount, _tapPeriod, overrides) { + return super.deploy(_name, _symbol, _tapAmount, _tapPeriod, overrides || {}); + } + getDeployTransaction(_name, _symbol, _tapAmount, _tapPeriod, overrides) { + return super.getDeployTransaction(_name, _symbol, _tapAmount, _tapPeriod, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ERC20Faucet__factory = ERC20Faucet__factory; +ERC20Faucet__factory.bytecode = _bytecode; +ERC20Faucet__factory.abi = _abi; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.d.ts new file mode 100644 index 0000000..c1e27c8 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.d.ts @@ -0,0 +1,5 @@ +export { BLUSDLPZap__factory } from "./BLUSDLPZap__factory"; +export { BLUSDToken__factory } from "./BLUSDToken__factory"; +export { BondNFT__factory } from "./BondNFT__factory"; +export { ChickenBondManager__factory } from "./ChickenBondManager__factory"; +export { ERC20Faucet__factory } from "./ERC20Faucet__factory"; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.js new file mode 100644 index 0000000..d3aaf71 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/factories/index.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ERC20Faucet__factory = exports.ChickenBondManager__factory = exports.BondNFT__factory = exports.BLUSDToken__factory = exports.BLUSDLPZap__factory = void 0; +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +var BLUSDLPZap__factory_1 = require("./BLUSDLPZap__factory"); +Object.defineProperty(exports, "BLUSDLPZap__factory", { enumerable: true, get: function () { return BLUSDLPZap__factory_1.BLUSDLPZap__factory; } }); +var BLUSDToken__factory_1 = require("./BLUSDToken__factory"); +Object.defineProperty(exports, "BLUSDToken__factory", { enumerable: true, get: function () { return BLUSDToken__factory_1.BLUSDToken__factory; } }); +var BondNFT__factory_1 = require("./BondNFT__factory"); +Object.defineProperty(exports, "BondNFT__factory", { enumerable: true, get: function () { return BondNFT__factory_1.BondNFT__factory; } }); +var ChickenBondManager__factory_1 = require("./ChickenBondManager__factory"); +Object.defineProperty(exports, "ChickenBondManager__factory", { enumerable: true, get: function () { return ChickenBondManager__factory_1.ChickenBondManager__factory; } }); +var ERC20Faucet__factory_1 = require("./ERC20Faucet__factory"); +Object.defineProperty(exports, "ERC20Faucet__factory", { enumerable: true, get: function () { return ERC20Faucet__factory_1.ERC20Faucet__factory; } }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.d.ts b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.d.ts new file mode 100644 index 0000000..92481de --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.d.ts @@ -0,0 +1,11 @@ +export type { BLUSDLPZap } from "./BLUSDLPZap"; +export type { BLUSDToken } from "./BLUSDToken"; +export type { BondNFT } from "./BondNFT"; +export type { ChickenBondManager } from "./ChickenBondManager"; +export type { ERC20Faucet } from "./ERC20Faucet"; +export * as factories from "./factories"; +export { BondNFT__factory } from "./factories/BondNFT__factory"; +export { BLUSDToken__factory } from "./factories/BLUSDToken__factory"; +export { ChickenBondManager__factory } from "./factories/ChickenBondManager__factory"; +export { ERC20Faucet__factory } from "./factories/ERC20Faucet__factory"; +export { BLUSDLPZap__factory } from "./factories/BLUSDLPZap__factory"; diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.js b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.js new file mode 100644 index 0000000..0ccb561 --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/lusd/types/index.js @@ -0,0 +1,37 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BLUSDLPZap__factory = exports.ERC20Faucet__factory = exports.ChickenBondManager__factory = exports.BLUSDToken__factory = exports.BondNFT__factory = exports.factories = void 0; +exports.factories = __importStar(require("./factories")); +var BondNFT__factory_1 = require("./factories/BondNFT__factory"); +Object.defineProperty(exports, "BondNFT__factory", { enumerable: true, get: function () { return BondNFT__factory_1.BondNFT__factory; } }); +var BLUSDToken__factory_1 = require("./factories/BLUSDToken__factory"); +Object.defineProperty(exports, "BLUSDToken__factory", { enumerable: true, get: function () { return BLUSDToken__factory_1.BLUSDToken__factory; } }); +var ChickenBondManager__factory_1 = require("./factories/ChickenBondManager__factory"); +Object.defineProperty(exports, "ChickenBondManager__factory", { enumerable: true, get: function () { return ChickenBondManager__factory_1.ChickenBondManager__factory; } }); +var ERC20Faucet__factory_1 = require("./factories/ERC20Faucet__factory"); +Object.defineProperty(exports, "ERC20Faucet__factory", { enumerable: true, get: function () { return ERC20Faucet__factory_1.ERC20Faucet__factory; } }); +var BLUSDLPZap__factory_1 = require("./factories/BLUSDLPZap__factory"); +Object.defineProperty(exports, "BLUSDLPZap__factory", { enumerable: true, get: function () { return BLUSDLPZap__factory_1.BLUSDLPZap__factory; } }); diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/package.json b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/package.json new file mode 100644 index 0000000..7bff1cd --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/package.json @@ -0,0 +1,19 @@ +{ + "name": "@liquity/chicken-bonds", + "version": "0.0.1", + "license": "MIT", + "scripts": { + "compile:lusd": "yarn --cwd lusd compile", + "deploy-fork:lusd": "yarn --cwd lusd deploy-fork", + "generate-types:lusd": "yarn --cwd lusd generate-types", + "deploy-fork": "run-s deploy-fork:*", + "generate-types": "run-s generate-types:*", + "compile": "run-s compile:*", + "prepare-publish": "./scripts/prepare.sh", + "publish:local": "./scripts/publish-local.sh", + "watch:lusd": "yarn --cwd lusd watch", + "watch:publish": "./scripts/watch-publish.sh", + "watch": "run-p watch:*" + }, + "yalcSig": "007bbe44375983ab942770ca53a2039e" +} diff --git a/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/yalc.sig b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/yalc.sig new file mode 100644 index 0000000..c04695c --- /dev/null +++ b/Templates/liquity-dev-frontend/.yalc/@liquity/chicken-bonds/yalc.sig @@ -0,0 +1 @@ +007bbe44375983ab942770ca53a2039e \ No newline at end of file diff --git a/Templates/liquity-dev-frontend/Dockerfile b/Templates/liquity-dev-frontend/Dockerfile new file mode 100644 index 0000000..2d532a7 --- /dev/null +++ b/Templates/liquity-dev-frontend/Dockerfile @@ -0,0 +1,7 @@ +# This Dockerfile is for quickly rolling an image from an already-built dev-frontend. +# If you want to build the image yourself, you must build the dev-frontend with `yarn build` first. + +FROM nginx +COPY etc /etc +COPY docker-entrypoint.d /docker-entrypoint.d +COPY build /usr/share/nginx/html diff --git a/Templates/liquity-dev-frontend/LICENSE b/Templates/liquity-dev-frontend/LICENSE new file mode 100644 index 0000000..c7c7b83 --- /dev/null +++ b/Templates/liquity-dev-frontend/LICENSE @@ -0,0 +1,907 @@ +The MIT License (MIT) + +Copyright (c) 2019-2021 Liquity AG + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------------------------------------------------------------------------------------------------------------------------- +The frontend and middleware (lib-...) packages use third-party software components governed by the license(s) indicated below: + +web3-react +---------- +https://www.npmjs.com/package/@web3-react/core +https://www.npmjs.com/package/@web3-react/injected-connector +https://www.npmjs.com/package/@web3-react/types + + +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + + +Font Awesome +------------ +https://www.npmjs.com/package/@fortawesome/fontawesome-svg-core +https://www.npmjs.com/package/@fortawesome/free-regular-svg-icons +https://www.npmjs.com/package/@fortawesome/free-solid-svg-icons +https://www.npmjs.com/package/@fortawesome/react-fontawesome + + +Font Awesome Free License +------------------------- + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license/free. + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) +In the Font Awesome Free download, the CC BY 4.0 license applies to all icons +packaged as SVG and JS file types. + +# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) +In the Font Awesome Free download, the SIL OFL license applies to all icons +packaged as web and desktop font files. + +# Code: MIT License (https://opensource.org/licenses/MIT) +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +# Attribution +Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +# Brand Icons +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** + + +Popper +------ + +https://www.npmjs.com/package/@popperjs/core +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +https://www.npmjs.com/package/react-popper +The MIT License (MIT) + +Copyright (c) 2018 React Popper authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +Ethers +------ +https://www.npmjs.com/package/ethers +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +React +----- +https://www.npmjs.com/package/react +https://www.npmjs.com/package/react-dom +https://www.npmjs.com/package/react-is + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +React Circular Progressbar +-------------------------- +https://www.npmjs.com/package/react-circular-progressbar + +MIT License + +Copyright (c) 2017 Kevin Qi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +react-copy-to-clipboard +----------------------- +https://www.npmjs.com/package/react-copy-to-clipboard + +The MIT License (MIT) + +Copyright (c) 2016 Nik Butenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +Theme UI +------- +https://www.npmjs.com/package/theme-ui + +# The MIT License (MIT) + +Copyright (c) 2019 Brent Jackson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Templates/liquity-dev-frontend/Readme.md b/Templates/liquity-dev-frontend/Readme.md new file mode 100644 index 0000000..f7faa86 --- /dev/null +++ b/Templates/liquity-dev-frontend/Readme.md @@ -0,0 +1,9 @@ +## Liquity dev frontend +forked from [here](https://github.com/liquity/dev/tree/main/packages/dev-frontend) + +#### local development +`yarn` +`yarn start` + +### build +`yarn build` \ No newline at end of file diff --git a/Templates/liquity-dev-frontend/docker-compose-example/config/nginx/site-confs/liquity.example.com b/Templates/liquity-dev-frontend/docker-compose-example/config/nginx/site-confs/liquity.example.com new file mode 100644 index 0000000..59ba583 --- /dev/null +++ b/Templates/liquity-dev-frontend/docker-compose-example/config/nginx/site-confs/liquity.example.com @@ -0,0 +1,14 @@ +server { + listen 443 ssl; + + server_name liquity.example.com; + + include /config/nginx/ssl.conf; + + location / { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=5s; + set $container dev-frontend; + proxy_pass http://$container; + } +} diff --git a/Templates/liquity-dev-frontend/docker-compose-example/docker-compose.yml b/Templates/liquity-dev-frontend/docker-compose-example/docker-compose.yml new file mode 100644 index 0000000..b171d67 --- /dev/null +++ b/Templates/liquity-dev-frontend/docker-compose-example/docker-compose.yml @@ -0,0 +1,40 @@ +version: "2.1" + +services: + swag: + image: linuxserver/swag + container_name: swag + cap_add: + - NET_ADMIN + environment: + - PUID=1000 # see https://github.com/linuxserver/docker-swag#user--group-identifiers + - PGID=1011 # see https://github.com/linuxserver/docker-swag#user--group-identifiers + - TZ=Europe/Berlin # customize this + - URL=example.com # customize this + - SUBDOMAINS=liquity # customize this + - VALIDATION=http + - ONLY_SUBDOMAINS=true + volumes: + - ./config:/config + ports: + - 443:443 + - 80:80 + restart: unless-stopped + + watchtower: + image: containrrr/watchtower + container_name: watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + command: --interval 1000 --cleanup --label-enable + restart: unless-stopped + + dev-frontend: + image: liquity/dev-frontend:latest + container_name: liquity-dev-frontend + environment: + - FRONTEND_TAG= # customize this + - INFURA_API_KEY= # (optional) customize this + restart: unless-stopped + labels: + com.centurylinklabs.watchtower.enable: "true" diff --git a/Templates/liquity-dev-frontend/docker-compose.yml b/Templates/liquity-dev-frontend/docker-compose.yml new file mode 100644 index 0000000..fccd93f --- /dev/null +++ b/Templates/liquity-dev-frontend/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3" + +services: + dev-frontend: + build: . + image: "liquity/dev-frontend:${TAG:-unknown}" + ports: + - 80:80 + environment: + # Ethereum address that shall receive LQTY rewards + - FRONTEND_TAG=0x0000000000000000000000000000000000000000 + # Optional Infura API key to enable snappier blockchain events using WebSockets + - INFURA_API_KEY= + restart: always diff --git a/Templates/liquity-dev-frontend/docker-entrypoint.d/99-frontend-config.sh b/Templates/liquity-dev-frontend/docker-entrypoint.d/99-frontend-config.sh new file mode 100755 index 0000000..957e66d --- /dev/null +++ b/Templates/liquity-dev-frontend/docker-entrypoint.d/99-frontend-config.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo_config() { + echo '{' + [ -n "$TESTNET_ONLY" ] && echo ' "testnetOnly": '$TESTNET_ONLY',' + echo ' "frontendTag": "'$FRONTEND_TAG'",' + echo ' "infuraApiKey": "'$INFURA_API_KEY'"' + echo '}' +} + +echo_config > /usr/share/nginx/html/config.json + +exit 0 diff --git a/Templates/liquity-dev-frontend/etc/nginx/conf.d/enable_gzip.conf b/Templates/liquity-dev-frontend/etc/nginx/conf.d/enable_gzip.conf new file mode 100644 index 0000000..9adb5b6 --- /dev/null +++ b/Templates/liquity-dev-frontend/etc/nginx/conf.d/enable_gzip.conf @@ -0,0 +1,9 @@ +gzip on; +gzip_disable "msie6"; + +gzip_vary on; +gzip_proxied any; +gzip_comp_level 6; +gzip_http_version 1.1; +gzip_min_length 256; +gzip_types text/html text/css application/javascript; diff --git a/Templates/liquity-dev-frontend/package.json b/Templates/liquity-dev-frontend/package.json new file mode 100644 index 0000000..1d4d7ee --- /dev/null +++ b/Templates/liquity-dev-frontend/package.json @@ -0,0 +1,77 @@ +{ + "name": "@liquity/dev-frontend", + "version": "0.1.0", + "private": true, + "homepage": ".", + "dependencies": { + "@ethersproject/abi": "5.4.0", + "@fortawesome/fontawesome-svg-core": "1.2.34", + "@fortawesome/free-regular-svg-icons": "5.15.2", + "@fortawesome/free-solid-svg-icons": "5.15.2", + "@fortawesome/react-fontawesome": "0.1.14", + "@liquity/chicken-bonds": "file:.yalc/@liquity/chicken-bonds", + "@metamask/eth-sig-util": "5.0.1", + "@testing-library/dom": "7.30.0", + "@testing-library/jest-dom": "5.11.9", + "@testing-library/react": "11.2.5", + "@testing-library/user-event": "12.8.3", + "@tippyjs/react": "4.2.5", + "@types/jest": "26.0.20", + "@types/react": "17.0.3", + "@types/react-copy-to-clipboard": "5.0.0", + "@types/react-dom": "17.0.2", + "@types/react-modal": "^3.13.1", + "@types/react-router-dom": "5.1.7", + "@types/testing-library__jest-dom": "5.9.5", + "@types/testing-library__react": "10.2.0", + "@types/testing-library__user-event": "4.2.0", + "@web3-react/core": "6.1.9", + "@web3-react/injected-connector": "6.0.7", + "@web3-react/types": "6.0.7", + "cross-env": "7.0.3", + "ethers": "5.4.3", + "lambert-w-function": "3.0.0", + "npm-run-all": "4.1.5", + "react": "17.0.1", + "react-circular-progressbar": "2.0.3", + "react-copy-to-clipboard": "5.0.3", + "react-dom": "17.0.1", + "react-is": "17.0.1", + "react-modal": "^3.15.1", + "react-router-dom": "5.2.0", + "react-scripts": "4.0.3", + "recharts": "2.1.10", + "source-map-explorer": "2.5.2", + "theme-ui": "0.6.0-canary.1544.5359f8a1e408a4dfeb74a9ae39688270286e534a.0", + "typescript": "4.1.5", + "yalc": "1.0.0-pre.53" + }, + "scripts": { + "analyze": "source-map-explorer 'build/static/js/*.js'", + "start": "react-scripts start", + "start-demo": "cross-env REACT_APP_DEMO_MODE=true run-s start", + "build": "run-s build:*", + "build:set-version": "node scripts/set-version.js", + "build:react": "react-scripts build", + "link:chicken-bonds": "yalc link @liquity/chicken-bonds", + "unlink:chicken-bonds": "yalc remove @liquity/chicken-bonds", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": [ + "chrome >= 67", + "edge >= 79", + "firefox >= 68", + "opera >= 54", + "safari >= 14" + ], + "devDependencies": { + "@liquity/lib-base": "^3.0.0", + "@liquity/lib-ethers": "^3.4.0", + "@liquity/lib-react": "^1.0.0", + "@liquity/providers": "^1.0.1" + } +} \ No newline at end of file diff --git a/Templates/liquity-dev-frontend/public/bonds/bond-info.png b/Templates/liquity-dev-frontend/public/bonds/bond-info.png new file mode 100644 index 0000000..38f4871 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/bonds/bond-info.png differ diff --git a/Templates/liquity-dev-frontend/public/bonds/egg-nft.png b/Templates/liquity-dev-frontend/public/bonds/egg-nft.png new file mode 100644 index 0000000..ce6c17a Binary files /dev/null and b/Templates/liquity-dev-frontend/public/bonds/egg-nft.png differ diff --git a/Templates/liquity-dev-frontend/public/favicon.png b/Templates/liquity-dev-frontend/public/favicon.png new file mode 100644 index 0000000..8855560 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/favicon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.png b/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.png new file mode 100644 index 0000000..21bedd9 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.svg b/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.svg new file mode 100644 index 0000000..53e9b36 --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/128-lqty-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.png b/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.png new file mode 100644 index 0000000..51f4e3c Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.svg b/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.svg new file mode 100644 index 0000000..3ae2395 --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/128-lusd-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.png b/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.png new file mode 100644 index 0000000..3f180e8 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.svg b/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.svg new file mode 100644 index 0000000..f26c76a --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/32-lqty-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.png b/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.png new file mode 100644 index 0000000..8855560 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.svg b/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.svg new file mode 100644 index 0000000..e43ded0 --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/32-lusd-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.png b/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.png new file mode 100644 index 0000000..bedb0ee Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.svg b/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.svg new file mode 100644 index 0000000..ad16937 --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/64-lqty-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.png b/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.png new file mode 100644 index 0000000..02d7727 Binary files /dev/null and b/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.svg b/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.svg new file mode 100644 index 0000000..f64ce2b --- /dev/null +++ b/Templates/liquity-dev-frontend/public/icons/64-lusd-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Templates/liquity-dev-frontend/public/index.html b/Templates/liquity-dev-frontend/public/index.html new file mode 100644 index 0000000..0e8e480 --- /dev/null +++ b/Templates/liquity-dev-frontend/public/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + Liquity Developer UI + + + +
+ + + diff --git a/Templates/liquity-dev-frontend/public/lusd-icon.png b/Templates/liquity-dev-frontend/public/lusd-icon.png new file mode 100644 index 0000000..51f4e3c Binary files /dev/null and b/Templates/liquity-dev-frontend/public/lusd-icon.png differ diff --git a/Templates/liquity-dev-frontend/public/manifest.json b/Templates/liquity-dev-frontend/public/manifest.json new file mode 100644 index 0000000..f98b13e --- /dev/null +++ b/Templates/liquity-dev-frontend/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "Liquity Dev UI", + "name": "Liquity Developer UI", + "icons": [ + { + "src": "favicon.png", + "sizes": "32x32", + "type": "image/png" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} \ No newline at end of file diff --git a/Templates/liquity-dev-frontend/public/robots.txt b/Templates/liquity-dev-frontend/public/robots.txt new file mode 100644 index 0000000..01b0f9a --- /dev/null +++ b/Templates/liquity-dev-frontend/public/robots.txt @@ -0,0 +1,2 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * diff --git a/Templates/liquity-dev-frontend/scripts/set-version.js b/Templates/liquity-dev-frontend/scripts/set-version.js new file mode 100644 index 0000000..7049c66 --- /dev/null +++ b/Templates/liquity-dev-frontend/scripts/set-version.js @@ -0,0 +1,32 @@ +const { execSync } = require("child_process"); +const { existsSync, readFileSync, writeFileSync } = require("fs"); + +const envVar = "REACT_APP_VERSION"; +const envVarPattern = new RegExp(`^${envVar}=.*`); + +const getCommitHash = () => { + try { + return execSync("git rev-parse HEAD", { encoding: "ascii" }).trim(); + } catch { + return "unknown"; + } +}; + +const commitHash = getCommitHash(); +let dotenv = [`${envVar}=${commitHash}`]; + +if (existsSync(".env")) { + const originalDotenv = readFileSync(".env", { encoding: "ascii" }).split("\n"); + + if (originalDotenv[originalDotenv.length - 1] === "") { + originalDotenv.pop(); + } + + if (originalDotenv.some(line => line.match(envVarPattern))) { + dotenv = originalDotenv.map(line => line.replace(envVarPattern, dotenv[0])); + } else { + dotenv = [...originalDotenv, ...dotenv]; + } +} + +writeFileSync(".env", [...dotenv, ""].join("\n")); diff --git a/Templates/liquity-dev-frontend/src/@types/window.ethereum.d.ts b/Templates/liquity-dev-frontend/src/@types/window.ethereum.d.ts new file mode 100644 index 0000000..606d4bc --- /dev/null +++ b/Templates/liquity-dev-frontend/src/@types/window.ethereum.d.ts @@ -0,0 +1,5 @@ +declare interface Window { + ethereum?: { + isMetaMask?: boolean; + }; +} diff --git a/Templates/liquity-dev-frontend/src/App.test.tsx b/Templates/liquity-dev-frontend/src/App.test.tsx new file mode 100644 index 0000000..0191391 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/App.test.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import { render, fireEvent } from "@testing-library/react"; + +import { Decimal, LUSD_MINIMUM_NET_DEBT, Trove } from "@liquity/lib-base"; + +import App from "./App"; + +const TEST_TIMEOUT = 5000; +const params = { depositCollateral: Decimal.from(20), borrowLUSD: LUSD_MINIMUM_NET_DEBT }; +const trove = Trove.create(params); + +jest.setTimeout(TEST_TIMEOUT); + +console.log(`${trove}`); + +/* + * Just a quick and dirty testcase to prove that the approach can work in our CI pipeline. + */ +test("there's no smoke", async () => { + const { getByText, getByLabelText, findByText } = render(); + + expect( + await findByText(/you can borrow lusd by opening a trove/i, undefined, { + timeout: TEST_TIMEOUT + }) + ).toBeInTheDocument(); + + fireEvent.click(getByText(/open trove/i)); + fireEvent.click(getByLabelText(/collateral/i)); + fireEvent.change(getByLabelText(/^collateral$/i), { target: { value: `${trove.collateral}` } }); + fireEvent.click(getByLabelText(/^borrow$/i)); + fireEvent.change(getByLabelText(/^borrow$/i), { target: { value: `${trove.debt}` } }); + + const confirmButton = await findByText(/confirm/i); + fireEvent.click(confirmButton); + + expect(await findByText(/adjust/i)).toBeInTheDocument(); +}); diff --git a/Templates/liquity-dev-frontend/src/App.tsx b/Templates/liquity-dev-frontend/src/App.tsx new file mode 100644 index 0000000..f63c2ae --- /dev/null +++ b/Templates/liquity-dev-frontend/src/App.tsx @@ -0,0 +1,112 @@ +import React from "react"; +import { Web3ReactProvider } from "@web3-react/core"; +import { Flex, Heading, ThemeProvider, Paragraph, Link } from "theme-ui"; + +import { BatchedWebSocketAugmentedWeb3Provider } from "@liquity/providers"; +import { LiquityProvider } from "./hooks/LiquityContext"; +import { WalletConnector } from "./components/WalletConnector"; +import { TransactionProvider } from "./components/Transaction"; +import { Icon } from "./components/Icon"; +import { getConfig } from "./config"; +import theme from "./theme"; + +import { DisposableWalletProvider } from "./testUtils/DisposableWalletProvider"; +import { LiquityFrontend } from "./LiquityFrontend"; +import { AppLoader } from "./components/AppLoader"; + +if (window.ethereum) { + // Silence MetaMask warning in console + Object.assign(window.ethereum, { autoRefreshOnNetworkChange: false }); +} + +if (process.env.REACT_APP_DEMO_MODE === "true") { + const ethereum = new DisposableWalletProvider( + process.env.REACT_APP_RPC_URL || `http://${window.location.hostname}:8545`, + "0x4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7" + ); + + Object.assign(window, { ethereum }); +} + +// Start pre-fetching the config +getConfig().then(config => { + // console.log("Frontend config:"); + // console.log(config); + Object.assign(window, { config }); +}); + +const EthersWeb3ReactProvider: React.FC = ({ children }) => { + return ( + new BatchedWebSocketAugmentedWeb3Provider(provider)}> + {children} + + ); +}; + +const UnsupportedMainnetFallback: React.FC = () => ( + + + This app is for testing purposes only. + + + + Please change your network to Ropsten, Rinkeby, Kovan, Görli or Kiln. + + + + If you'd like to use the Liquity Protocol on mainnet, please pick a frontend{" "} + + here + + . + + +); + +const App = () => { + const unsupportedNetworkFallback = (chainId: number) => ( + + + Liquity is not yet deployed to{" "} + {chainId === 1 ? "mainnet" : "this network"}. + + Please switch to Ropsten, Rinkeby, Kovan, Görli or Kiln. + + ); + + return ( + + + }> + } + unsupportedNetworkFallback={unsupportedNetworkFallback} + unsupportedMainnetFallback={} + > + + } /> + + + + + + ); +}; + +export default App; diff --git a/Templates/liquity-dev-frontend/src/LiquityFrontend.tsx b/Templates/liquity-dev-frontend/src/LiquityFrontend.tsx new file mode 100644 index 0000000..8aa4f73 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/LiquityFrontend.tsx @@ -0,0 +1,85 @@ +import React from "react"; +import { Flex, Container } from "theme-ui"; +import { HashRouter as Router, Switch, Route } from "react-router-dom"; +import { Wallet } from "@ethersproject/wallet"; + +import { Decimal, Difference, Trove } from "@liquity/lib-base"; +import { LiquityStoreProvider } from "@liquity/lib-react"; + +import { useLiquity } from "./hooks/LiquityContext"; +import { TransactionMonitor } from "./components/Transaction"; +import { UserAccount } from "./components/UserAccount"; +import { SystemStatsPopup } from "./components/SystemStatsPopup"; +import { Header } from "./components/Header"; + +import { PageSwitcher } from "./pages/PageSwitcher"; +import { RiskyTrovesPage } from "./pages/RiskyTrovesPage"; +import { Bonds } from "./pages/Bonds"; + +import { TroveViewProvider } from "./components/Trove/context/TroveViewProvider"; +import { StabilityViewProvider } from "./components/Stability/context/StabilityViewProvider"; +import { StakingViewProvider } from "./components/Staking/context/StakingViewProvider"; +import "tippy.js/dist/tippy.css"; // Tooltip default style +import { BondsProvider } from "./components/Bonds/context/BondsProvider"; + +type LiquityFrontendProps = { + loader?: React.ReactNode; +}; +export const LiquityFrontend: React.FC = ({ loader }) => { + const { account, provider, liquity } = useLiquity(); + + // For console tinkering ;-) + Object.assign(window, { + account, + provider, + liquity, + Trove, + Decimal, + Difference, + Wallet + }); + + return ( + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+ ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Abbreviation.tsx b/Templates/liquity-dev-frontend/src/components/Abbreviation.tsx new file mode 100644 index 0000000..37a77cb --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Abbreviation.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import { Box, BoxProps } from "theme-ui"; + +type AbbreviationProps = BoxProps & { + short: React.ReactNode; +}; + +export const Abbreviation: React.FC = ({ children, short, ...boxProps }) => ( + + + {children} + + + + {short} + + +); diff --git a/Templates/liquity-dev-frontend/src/components/ActionDescription.tsx b/Templates/liquity-dev-frontend/src/components/ActionDescription.tsx new file mode 100644 index 0000000..208ffee --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/ActionDescription.tsx @@ -0,0 +1,31 @@ +import { Box, Flex, Text } from "theme-ui"; + +import { Icon } from "./Icon"; + +export const ActionDescription: React.FC = ({ children }) => ( + + + + {children} + + +); + +export const Amount: React.FC = ({ children }) => ( + {children} +); diff --git a/Templates/liquity-dev-frontend/src/components/AppLoader.tsx b/Templates/liquity-dev-frontend/src/components/AppLoader.tsx new file mode 100644 index 0000000..c6a3ab1 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/AppLoader.tsx @@ -0,0 +1,8 @@ +import { Flex, Spinner, Heading } from "theme-ui"; + +export const AppLoader = () => ( + + + Loading... + +); diff --git a/Templates/liquity-dev-frontend/src/components/Badge.tsx b/Templates/liquity-dev-frontend/src/components/Badge.tsx new file mode 100644 index 0000000..2bcbce4 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Badge.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { Flex } from "theme-ui"; + +export const Badge: React.FC = ({ children }) => { + return {children}; +}; diff --git a/Templates/liquity-dev-frontend/src/components/BondStats.tsx b/Templates/liquity-dev-frontend/src/components/BondStats.tsx new file mode 100644 index 0000000..5550bf1 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/BondStats.tsx @@ -0,0 +1,130 @@ +import React from "react"; +import { Card, Heading, Text, Flex } from "theme-ui"; +import { Decimal } from "@liquity/lib-base"; +import * as l from "../components/Bonds/lexicon"; +import { Statistic } from "./Statistic"; +import { TreasuryChart } from "./TreasuryChart"; +import { useBondView } from "./Bonds/context/BondViewContext"; + +type BondStatsProps = { + variant?: string; +}; + +type MetricProps = { + value: string | undefined; + unit?: string; +}; + +const Metric: React.FC = ({ value, unit }) => { + return ( + <> + {value} +   + {unit && {unit}} + + ); +}; + +export const BondStats: React.FC = () => { + const { stats, protocolInfo } = useBondView(); + + if (stats === undefined || protocolInfo === undefined) return null; + + return ( + + LUSD bonds + + + bLUSD + + + + + + + + + + + + + + + + + + + + + + + + + + + + Statistics + + + + + + + + + + + + + + + + Treasury + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/Bonds.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/Bonds.tsx new file mode 100644 index 0000000..7f53cba --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/Bonds.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { useBondView } from "./context/BondViewContext"; +import { Idle } from "./views/idle/Idle"; +import { Actioning } from "./views/actioning/Actioning"; +import { Creating } from "./views/creating/Creating"; +import { InfoMessage } from "../InfoMessage"; +import { Container } from "theme-ui"; +import { Swapping } from "./views/swapping/Swapping"; +import { ManagingLiquidity } from "./views/managing/ManagingLiquidity"; + +export const Bonds: React.FC = () => { + const { view, hasFoundContracts } = useBondView(); + + if (!hasFoundContracts) { + return ( + + + LUSD Bonds don't seem to be deployed to this network. + + + ); + } + + let View = null; + switch (view) { + case "CANCELLING": + case "CLAIMING": { + View = ; + break; + } + case "CREATING": { + View = ; + break; + } + case "SWAPPING": { + View = ; + break; + } + case "MANAGING_LIQUIDITY": { + View = ; + break; + } + } + + return ( + <> + + {View} + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/BondsTable.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/BondsTable.tsx new file mode 100644 index 0000000..95cdb02 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/BondsTable.tsx @@ -0,0 +1,145 @@ +/** @jsxImportSource theme-ui */ +import React from "react"; +import { Card, Text, Box, Heading, Flex, Grid, Button } from "theme-ui"; +import { InfoIcon } from "../InfoIcon"; +import * as lexicon from "./lexicon"; +import { Empty } from "./views/idle/Empty"; +import { Link } from "../Link"; +import { useBondView } from "./context/BondViewContext"; +import { Decimal } from "@liquity/lib-base"; +import { InfiniteEstimate } from "./views/InfiniteEstimation"; + +const { + BONDS, + BOND_DEPOSIT: BOND_AMOUNT, + ACCRUED_AMOUNT, + MARKET_VALUE, + OPTIMUM_REBOND_TIME, + BREAK_EVEN_TIME +} = lexicon; + +const LineSegment: React.FC = () => ( + +); + +const formatDays = (days: number) => + days < 0 + ? "Elapsed" + : days === 0 + ? "Now" + : parseFloat(days.toFixed(1)) < 1 + ? `${days.toFixed(1)} days` + : days > 10000 + ? Decimal.INFINITY.toString() + : `${days.toFixed(0)} days`; + +const Line = (columns: number) => + Array.from(Array(columns)).map((_, idx) => ); + +const columns = 5; + +export const BondsTable: React.FC = () => { + const { bonds, hasLoaded } = useBondView(); + + if (!hasLoaded) return null; + + const pendingBonds = bonds ? bonds.filter(bond => bond.status === "PENDING") : []; + const hasBonds = pendingBonds.length > 0; + return ( + + + + Pending bonds{" "} + {BONDS.description}} + /> + + + + + {!hasBonds && } + {hasBonds && ( + + + {BOND_AMOUNT.term}{" "} + {BOND_AMOUNT.description}} + /> + + + {ACCRUED_AMOUNT.term}{" "} + {ACCRUED_AMOUNT.description}} + /> + + + {MARKET_VALUE.term}{" "} + {MARKET_VALUE.description}} + /> + + + {BREAK_EVEN_TIME.term}{" "} + {BREAK_EVEN_TIME.description}} + /> + + + {OPTIMUM_REBOND_TIME.term}{" "} + {OPTIMUM_REBOND_TIME.description}} + /> + + {Line(5)} + + {pendingBonds.map((bond, idx) => { + const breakEvenDays = formatDays( + (bond.breakEvenTime.getTime() - Date.now()) / 1000 / 60 / 60 / 24 + ); + const rebondDays = formatDays( + (bond.rebondTime.getTime() - Date.now()) / 1000 / 60 / 60 / 24 + ); + return ( + + {bond.deposit.shorten()} LUSD + {bond.accrued.shorten()} bLUSD + {bond.marketValue.shorten()} LUSD + + + + + + + {Line(5)} + + ); + })} + + )} + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/Record.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/Record.tsx new file mode 100644 index 0000000..cfe478b --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/Record.tsx @@ -0,0 +1,31 @@ +import { ThemeUIStyleObject, Flex, Text } from "theme-ui"; +import { InfoIcon } from "../InfoIcon"; +import { Placeholder } from "../Placeholder"; +import type { Lexicon } from "../../lexicon"; + +type RecordType = { + lexicon: Lexicon; + description?: string; + value?: string; + type?: string; + style?: ThemeUIStyleObject; +}; + +export const Record: React.FC = ({ lexicon, value, type, style }) => { + return ( + + + {lexicon.term} + + + {value ? ( + {value} + ) : ( + + )} +   + {value && {type}} + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/BondAddressesContext.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondAddressesContext.tsx new file mode 100644 index 0000000..89a285f --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondAddressesContext.tsx @@ -0,0 +1,43 @@ +import { useWeb3React } from "@web3-react/core"; +import React, { useContext, createContext } from "react"; + +import mainnet from "@liquity/chicken-bonds/lusd/addresses/mainnet.json"; +import goerli from "@liquity/chicken-bonds/lusd/addresses/goerli.json"; +import { Addresses } from "./transitions"; + +const nullAddresses: Addresses = { + BLUSD_AMM_ADDRESS: null, + BLUSD_AMM_STAKING_ADDRESS: null, + BLUSD_TOKEN_ADDRESS: null, + BOND_NFT_ADDRESS: null, + CHICKEN_BOND_MANAGER_ADDRESS: null, + LUSD_OVERRIDE_ADDRESS: null, + BLUSD_LP_ZAP_ADDRESS: null +}; + +export const chainIdAddressesMap: Partial> = { + 1: mainnet, + 5: goerli + // 11155111: sepolia +}; + +export const BondAddressesContext = createContext(undefined); + +export const useBondAddresses = (): Addresses => { + const context = useContext(BondAddressesContext); + + if (context === undefined) { + throw new Error("You must add a into the React tree"); + } + + return context; +}; + +export const BondAddressesProvider: React.FC = ({ children }) => { + const { chainId } = useWeb3React(); + + const addresses: Addresses = + chainId !== undefined ? chainIdAddressesMap[chainId] ?? nullAddresses : nullAddresses; + + return {children}; +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewContext.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewContext.tsx new file mode 100644 index 0000000..e6734fb --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewContext.tsx @@ -0,0 +1,78 @@ +import { createContext, useContext } from "react"; +import type { + BondView, + BondEvent, + Payload, + Bond, + Stats, + BondTransactionStatuses, + ProtocolInfo, + OptimisticBond, + BLusdAmmTokenIndex, + Addresses, + BLusdLpRewards +} from "./transitions"; +import { PENDING_STATUS, CANCELLED_STATUS, CLAIMED_STATUS } from "../lexicon"; +import { Decimal } from "@liquity/lib-base"; + +export type BondViewContextType = { + view: BondView; + dispatchEvent: (event: BondEvent, payload?: Payload) => void; + selectedBondId?: string; + protocolInfo?: ProtocolInfo; + stats?: Stats; + bonds?: Bond[]; + selectedBond?: Bond; + optimisticBond?: OptimisticBond; + bLusdBalance?: Decimal; + lusdBalance?: Decimal; + lpTokenBalance?: Decimal; + stakedLpTokenBalance?: Decimal; + lpTokenSupply?: Decimal; + bLusdAmmBLusdBalance?: Decimal; + bLusdAmmLusdBalance?: Decimal; + statuses: BondTransactionStatuses; + isSynchronizing: boolean; + getLusdFromFaucet: () => Promise; + simulatedProtocolInfo?: ProtocolInfo; + setSimulatedMarketPrice: (marketPrice: Decimal) => void; + resetSimulatedMarketPrice: () => void; + hasFoundContracts: boolean; + isBLusdApprovedWithBlusdAmm: boolean; + isLusdApprovedWithBlusdAmm: boolean; + isLusdApprovedWithAmmZapper: boolean; + isBLusdApprovedWithAmmZapper: boolean; + isBLusdLpApprovedWithAmmZapper: boolean; + isBLusdLpApprovedWithGauge: boolean; + inputToken: BLusdAmmTokenIndex.BLUSD | BLusdAmmTokenIndex.LUSD; + isInputTokenApprovedWithBLusdAmm: boolean; + getExpectedSwapOutput: (inputToken: BLusdAmmTokenIndex, inputAmount: Decimal) => Promise; + getExpectedLpTokens: (bLusdAmount: Decimal, lusdAmount: Decimal) => Promise; + getExpectedWithdrawal: ( + burnLp: Decimal, + output: BLusdAmmTokenIndex | "both" + ) => Promise>; + isBootstrapPeriodActive?: boolean; + hasLoaded: boolean; + addresses: Addresses; + lpRewards: BLusdLpRewards | undefined; +}; + +export const BondViewContext = createContext(null); + +export const useBondView = (): BondViewContextType => { + const context: BondViewContextType | null = useContext(BondViewContext); + + if (context === null) { + throw new Error("You must add a into the React tree"); + } + + return context; +}; + +export const statuses = { + PENDING: PENDING_STATUS.term, + CANCELLED: CANCELLED_STATUS.term, + CLAIMED: CLAIMED_STATUS.term, + NON_EXISTENT: "NON_EXISTENT" +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewProvider.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewProvider.tsx new file mode 100644 index 0000000..62186e3 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondViewProvider.tsx @@ -0,0 +1,696 @@ +import React, { useState, useCallback, useEffect, useRef, useMemo } from "react"; +import { BondViewContext, BondViewContextType } from "./BondViewContext"; +import type { + Stats, + BondView, + BondEvent, + Payload, + Bond, + BondTransactionStatuses, + CreateBondPayload, + ProtocolInfo, + OptimisticBond, + SwapPayload, + ApprovePressedPayload, + ManageLiquidityPayload, + BLusdLpRewards +} from "./transitions"; +import { BLusdAmmTokenIndex } from "./transitions"; +import { transitions } from "./transitions"; +import { Decimal } from "@liquity/lib-base"; +import { useLiquity } from "../../../hooks/LiquityContext"; +import { api, _getProtocolInfo } from "./api"; +import { useTransaction } from "../../../hooks/useTransaction"; +import type { ERC20Faucet } from "@liquity/chicken-bonds/lusd/types"; +import { useBondContracts } from "./useBondContracts"; +import { useWeb3React } from "@web3-react/core"; +import { useBondAddresses } from "./BondAddressesContext"; + +// Refresh backend values every 15 seconds +const SYNCHRONIZE_INTERVAL_MS = 15 * 1000; + +const isValidEvent = (view: BondView, event: BondEvent): boolean => { + return transitions[view][event] !== undefined; +}; + +const transition = (view: BondView, event: BondEvent): BondView => { + const nextView = transitions[view][event] ?? view; + return nextView; +}; + +export const EXAMPLE_NFT = "./bonds/egg-nft.png"; + +export const BondViewProvider: React.FC = props => { + const { children } = props; + const [view, setView] = useState("IDLE"); + const viewRef = useRef(view); + const [selectedBondId, setSelectedBondId] = useState(); + const [optimisticBond, setOptimisticBond] = useState(); + const [shouldSynchronize, setShouldSynchronize] = useState(true); + const [bonds, setBonds] = useState(); + const [stats, setStats] = useState(); + const [protocolInfo, setProtocolInfo] = useState(); + const [simulatedProtocolInfo, setSimulatedProtocolInfo] = useState(); + const [lpRewards, setLpRewards] = useState(); + const [isLusdApprovedWithBlusdAmm, setIsLusdApprovedWithBlusdAmm] = useState(false); + const [isBLusdApprovedWithBlusdAmm, setIsBLusdApprovedWithBlusdAmm] = useState(false); + const [isLusdApprovedWithAmmZapper, setIsLusdApprovedWithAmmZapper] = useState(false); + const [isBLusdApprovedWithAmmZapper, setIsBLusdApprovedWithAmmZapper] = useState(false); + const [isBLusdLpApprovedWithAmmZapper, setIsBLusdLpApprovedWithAmmZapper] = useState(false); + const [isBLusdLpApprovedWithGauge, setIsBLusdLpApprovedWithGauge] = useState(false); + const [isSynchronizing, setIsSynchronizing] = useState(false); + const [inputToken, setInputToken] = useState( + BLusdAmmTokenIndex.BLUSD + ); + const [statuses, setStatuses] = useState({ + CREATE: "IDLE", + CANCEL: "IDLE", + CLAIM: "IDLE", + APPROVE_AMM: "IDLE", + APPROVE_SPENDER: "IDLE", + SWAP: "IDLE", + MANAGE_LIQUIDITY: "IDLE" + }); + const [bLusdBalance, setBLusdBalance] = useState(); + const [lusdBalance, setLusdBalance] = useState(); + const [lpTokenBalance, setLpTokenBalance] = useState(); + const [stakedLpTokenBalance, setStakedLpTokenBalance] = useState(); + + const [lpTokenSupply, setLpTokenSupply] = useState(); + const [bLusdAmmBLusdBalance, setBLusdAmmBLusdBalance] = useState(); + const [bLusdAmmLusdBalance, setBLusdAmmLusdBalance] = useState(); + const [isBootstrapPeriodActive, setIsBootstrapPeriodActive] = useState(); + const { account, liquity } = useLiquity(); + const { + LUSD_OVERRIDE_ADDRESS, + BLUSD_AMM_ADDRESS, + BLUSD_LP_ZAP_ADDRESS, + BLUSD_AMM_STAKING_ADDRESS + } = useBondAddresses(); + const contracts = useBondContracts(); + const { chainId } = useWeb3React(); + const isMainnet = chainId === 1; + + const setSimulatedMarketPrice = useCallback( + (marketPrice: Decimal) => { + if (protocolInfo === undefined) return; + const simulatedProtocolInfo = _getProtocolInfo( + marketPrice, + protocolInfo.floorPrice, + protocolInfo.claimBondFee, + protocolInfo.alphaAccrualFactor + ); + + setSimulatedProtocolInfo({ + ...protocolInfo, + ...simulatedProtocolInfo, + simulatedMarketPrice: marketPrice + }); + }, + [protocolInfo] + ); + + const resetSimulatedMarketPrice = useCallback(() => { + if (protocolInfo === undefined) return; + + setSimulatedProtocolInfo({ ...protocolInfo }); + }, [protocolInfo]); + + const removeBondFromList = useCallback( + (bondId: string) => { + if (bonds === undefined) return; + const idx = bonds.findIndex(bond => bond.id === bondId); + const nextBonds = bonds.slice(0, idx).concat(bonds.slice(idx + 1)); + setBonds(nextBonds); + }, + [bonds] + ); + + const changeBondStatusToClaimed = useCallback( + (bondId: string) => { + if (bonds === undefined) return; + const idx = bonds.findIndex(bond => bond.id === bondId); + const updatedBond: Bond = { ...bonds[idx], status: "CLAIMED" }; + const nextBonds = bonds + .slice(0, idx) + .concat(updatedBond) + .concat(bonds.slice(idx + 1)); + setBonds(nextBonds); + }, + [bonds] + ); + + const getLusdFromFaucet = useCallback(async () => { + if (contracts.lusdToken === undefined) return; + if ( + LUSD_OVERRIDE_ADDRESS !== null && + (await contracts.lusdToken.balanceOf(account)).eq(0) && + "tap" in contracts.lusdToken + ) { + await (await ((contracts.lusdToken as unknown) as ERC20Faucet).tap()).wait(); + setShouldSynchronize(true); + } + }, [contracts.lusdToken, account, LUSD_OVERRIDE_ADDRESS]); + + useEffect(() => { + (async () => { + if ( + BLUSD_AMM_ADDRESS === null || + contracts.lusdToken === undefined || + isLusdApprovedWithBlusdAmm + ) { + return; + } + const isApproved = await (isMainnet + ? api.isTokenApprovedWithBLusdAmmMainnet(account, contracts.lusdToken) + : api.isTokenApprovedWithBLusdAmm(account, contracts.lusdToken, BLUSD_AMM_ADDRESS)); + + setIsLusdApprovedWithBlusdAmm(isApproved); + })(); + }, [contracts.lusdToken, account, isLusdApprovedWithBlusdAmm, isMainnet, BLUSD_AMM_ADDRESS]); + + useEffect(() => { + (async () => { + if ( + BLUSD_AMM_ADDRESS === null || + contracts.bLusdToken === undefined || + isBLusdApprovedWithBlusdAmm + ) { + return; + } + + const isApproved = await (isMainnet + ? api.isTokenApprovedWithBLusdAmmMainnet(account, contracts.bLusdToken) + : api.isTokenApprovedWithBLusdAmm(account, contracts.bLusdToken, BLUSD_AMM_ADDRESS)); + + setIsBLusdApprovedWithBlusdAmm(isApproved); + })(); + }, [contracts.bLusdToken, account, isBLusdApprovedWithBlusdAmm, isMainnet, BLUSD_AMM_ADDRESS]); + + useEffect(() => { + (async () => { + if ( + BLUSD_LP_ZAP_ADDRESS === null || + contracts.lusdToken === undefined || + isLusdApprovedWithAmmZapper + ) { + return; + } + + const isLusdApproved = await api.isTokenApprovedWithAmmZapper( + account, + contracts.lusdToken, + BLUSD_LP_ZAP_ADDRESS + ); + + setIsLusdApprovedWithAmmZapper(isLusdApproved); + })(); + }, [contracts.lusdToken, account, isLusdApprovedWithAmmZapper, BLUSD_LP_ZAP_ADDRESS]); + + useEffect(() => { + (async () => { + if (contracts.bLusdAmm === undefined || isBLusdLpApprovedWithAmmZapper) return; + const lpToken = await api.getLpToken(contracts.bLusdAmm); + const isLpApproved = await api.isTokenApprovedWithAmmZapper( + account, + lpToken, + BLUSD_LP_ZAP_ADDRESS + ); + + setIsBLusdLpApprovedWithAmmZapper(isLpApproved); + })(); + }, [contracts.bLusdAmm, account, isBLusdLpApprovedWithAmmZapper, BLUSD_LP_ZAP_ADDRESS]); + + useEffect(() => { + (async () => { + if ( + BLUSD_LP_ZAP_ADDRESS === null || + contracts.bLusdToken === undefined || + isBLusdApprovedWithAmmZapper + ) { + return; + } + + const isBLusdApproved = await api.isTokenApprovedWithAmmZapper( + account, + contracts.bLusdToken, + BLUSD_LP_ZAP_ADDRESS + ); + + setIsLusdApprovedWithAmmZapper(isBLusdApproved); + })(); + }, [contracts.bLusdToken, account, isBLusdApprovedWithAmmZapper, BLUSD_LP_ZAP_ADDRESS]); + + useEffect(() => { + if (isSynchronizing) return; + const timer = setTimeout(() => setShouldSynchronize(true), SYNCHRONIZE_INTERVAL_MS); + + return () => { + clearTimeout(timer); + }; + }, [isSynchronizing]); + + useEffect(() => { + (async () => { + try { + if ( + contracts.lusdToken === undefined || + contracts.bondNft === undefined || + contracts.chickenBondManager === undefined || + contracts.bLusdToken === undefined || + contracts.bLusdAmm === undefined || + contracts.bLusdGauge === undefined || + !shouldSynchronize || + isSynchronizing + ) { + return; + } + setIsSynchronizing(true); + + const latest = await contracts.getLatestData(account, api); + if (latest === undefined) { + setIsSynchronizing(false); + return; + } + + const { + protocolInfo, + bonds, + stats, + bLusdBalance, + lusdBalance, + lpTokenBalance, + stakedLpTokenBalance, + lpTokenSupply, + bLusdAmmBLusdBalance, + bLusdAmmLusdBalance, + lpRewards + } = latest; + + setProtocolInfo(protocolInfo); + + // Don't change the simualted price if we already have one since only the user should change it + if (simulatedProtocolInfo === undefined) { + const simulatedProtocolInfo = _getProtocolInfo( + protocolInfo.simulatedMarketPrice, + protocolInfo.floorPrice, + protocolInfo.claimBondFee, + protocolInfo.alphaAccrualFactor + ); + setSimulatedProtocolInfo({ + ...protocolInfo, + ...simulatedProtocolInfo, + simulatedMarketPrice: protocolInfo.simulatedMarketPrice + }); + } + + setShouldSynchronize(false); + setLpRewards(lpRewards); + setBLusdBalance(bLusdBalance); + setLusdBalance(lusdBalance); + setLpTokenBalance(lpTokenBalance); + setStakedLpTokenBalance(stakedLpTokenBalance); + setLpTokenSupply(lpTokenSupply); + setBLusdAmmBLusdBalance(bLusdAmmBLusdBalance); + setBLusdAmmLusdBalance(bLusdAmmLusdBalance); + setStats(stats); + setBonds(bonds); + setOptimisticBond(undefined); + } catch (error: unknown) { + console.error("Synchronising effect exception", error); + } + + setIsSynchronizing(false); + })(); + }, [isSynchronizing, shouldSynchronize, account, contracts, simulatedProtocolInfo]); + + const [approveAmm, approveAmmStatus] = useTransaction( + async (tokensNeedingApproval: BLusdAmmTokenIndex[]) => { + for (const token of tokensNeedingApproval) { + if (token === BLusdAmmTokenIndex.BLUSD) { + await (isMainnet + ? api.approveTokenWithBLusdAmmMainnet(contracts.bLusdToken) + : api.approveTokenWithBLusdAmm(contracts.bLusdToken, BLUSD_AMM_ADDRESS)); + + setIsBLusdApprovedWithBlusdAmm(true); + } else { + await (isMainnet + ? api.approveTokenWithBLusdAmmMainnet(contracts.lusdToken) + : api.approveTokenWithBLusdAmm(contracts.lusdToken, BLUSD_AMM_ADDRESS)); + + setIsLusdApprovedWithBlusdAmm(true); + } + } + }, + [contracts.bLusdToken, contracts.lusdToken, isMainnet, BLUSD_AMM_ADDRESS] + ); + + const [approveTokens, approveTokensStatus] = useTransaction( + async ({ tokensNeedingApproval }: ApprovePressedPayload) => { + if (contracts.bLusdAmm === undefined) return; + for (const [token, spender] of Array.from(tokensNeedingApproval)) { + if (token === BLusdAmmTokenIndex.BLUSD) { + await api.approveToken(contracts.bLusdToken, spender); + if (spender === BLUSD_AMM_ADDRESS) { + setIsBLusdApprovedWithBlusdAmm(true); + } else if (spender === BLUSD_LP_ZAP_ADDRESS) { + setIsBLusdApprovedWithAmmZapper(true); + } + } else if (token === BLusdAmmTokenIndex.LUSD) { + await api.approveToken(contracts.lusdToken, BLUSD_LP_ZAP_ADDRESS); + setIsLusdApprovedWithAmmZapper(true); + } else if (token === BLusdAmmTokenIndex.BLUSD_LUSD_LP && spender === undefined) { + const lpToken = await api.getLpToken(contracts.bLusdAmm); + await api.approveToken(lpToken, BLUSD_LP_ZAP_ADDRESS); + setIsBLusdLpApprovedWithAmmZapper(true); + } else if (token === BLusdAmmTokenIndex.BLUSD_LUSD_LP) { + const lpToken = await api.getLpToken(contracts.bLusdAmm); + await api.approveToken(lpToken, spender); + if (spender === BLUSD_LP_ZAP_ADDRESS) { + setIsBLusdLpApprovedWithAmmZapper(true); + } else if (spender === BLUSD_AMM_STAKING_ADDRESS) { + setIsBLusdLpApprovedWithGauge(true); + } + } + } + }, + [ + contracts.bLusdAmm, + contracts.bLusdToken, + contracts.lusdToken, + BLUSD_LP_ZAP_ADDRESS, + BLUSD_AMM_STAKING_ADDRESS, + BLUSD_AMM_ADDRESS, + isBLusdApprovedWithAmmZapper, + isLusdApprovedWithAmmZapper + ] + ); + + const [createBond, createStatus] = useTransaction( + async (lusdAmount: Decimal) => { + if (liquity.connection.signer === undefined) return; + + await api.createBond( + lusdAmount, + account, + LUSD_OVERRIDE_ADDRESS ?? liquity.connection.addresses.lusdToken, + contracts.lusdToken, + contracts.chickenBondManager, + liquity.connection.signer + ); + const optimisticBond: OptimisticBond = { + id: "OPTIMISTIC_BOND", + deposit: lusdAmount, + startTime: Date.now(), + status: "PENDING" + }; + setOptimisticBond(optimisticBond); + setShouldSynchronize(true); + }, + [contracts.chickenBondManager, contracts.lusdToken, liquity.connection.signer, account] + ); + + const [cancelBond, cancelStatus] = useTransaction( + async (bondId: string, minimumLusd: Decimal) => { + await api.cancelBond(bondId, minimumLusd, contracts.chickenBondManager); + removeBondFromList(bondId); + setShouldSynchronize(true); + }, + [contracts.chickenBondManager, removeBondFromList] + ); + + const [claimBond, claimStatus] = useTransaction( + async (bondId: string) => { + await api.claimBond(bondId, contracts.chickenBondManager); + changeBondStatusToClaimed(bondId); + setShouldSynchronize(true); + }, + [contracts.chickenBondManager, changeBondStatusToClaimed] + ); + + const getExpectedSwapOutput = useCallback( + async (inputToken: BLusdAmmTokenIndex, inputAmount: Decimal) => + contracts.bLusdAmm + ? (isMainnet ? api.getExpectedSwapOutputMainnet : api.getExpectedSwapOutput)( + inputToken, + inputAmount, + contracts.bLusdAmm + ) + : Decimal.ZERO, + [contracts.bLusdAmm, isMainnet] + ); + + const [swapTokens, swapStatus] = useTransaction( + async (inputToken: BLusdAmmTokenIndex, inputAmount: Decimal, minOutputAmount: Decimal) => { + await (isMainnet ? api.swapTokensMainnet : api.swapTokens)( + inputToken, + inputAmount, + minOutputAmount, + contracts.bLusdAmm + ); + setShouldSynchronize(true); + }, + [contracts.bLusdAmm] + ); + + const getExpectedLpTokens = useCallback( + async (bLusdAmount: Decimal, lusdAmount: Decimal) => { + if (liquity.connection.signer === undefined) return Decimal.ZERO; + + return contracts.bLusdAmmZapper + ? api.getExpectedLpTokens(bLusdAmount, lusdAmount, contracts.bLusdAmmZapper) + : Decimal.ZERO; + }, + [contracts.bLusdAmmZapper, liquity.connection.signer] + ); + + const [manageLiquidity, manageLiquidityStatus] = useTransaction( + async (params: ManageLiquidityPayload) => { + if (params.action === "addLiquidity") { + await api.addLiquidity( + params.bLusdAmount, + params.lusdAmount, + params.minLpTokens, + params.shouldStakeInGauge, + contracts.bLusdAmmZapper + ); + } else if (params.action === "removeLiquidity") { + await api.removeLiquidity( + params.burnLpTokens, + params.minBLusdAmount, + params.minLusdAmount, + contracts.bLusdAmmZapper + ); + } else if (params.action === "removeLiquidityOneCoin") { + await api.removeLiquidityOneCoin( + params.burnLpTokens, + params.output, + params.minAmount, + contracts.bLusdAmmZapper, + contracts.bLusdAmm + ); + } else if (params.action === "stakeLiquidity") { + await api.stakeLiquidity(params.stakeAmount, contracts.bLusdGauge); + } else if (params.action === "unstakeLiquidity") { + await api.unstakeLiquidity(params.unstakeAmount, contracts.bLusdGauge); + } else if (params.action === "claimLpRewards") { + await api.claimLpRewards(contracts.bLusdGauge); + } + setShouldSynchronize(true); + }, + [contracts.bLusdAmmZapper, contracts.bLusdGauge] + ); + + const getExpectedWithdrawal = useCallback( + async ( + burnLp: Decimal, + output: BLusdAmmTokenIndex | "both" + ): Promise> => { + if (contracts.bLusdAmm === undefined) + return new Map([ + [BLusdAmmTokenIndex.LUSD, Decimal.ZERO], + [BLusdAmmTokenIndex.BLUSD, Decimal.ZERO] + ]); + + return contracts.bLusdAmmZapper + ? api.getExpectedWithdrawal(burnLp, output, contracts.bLusdAmmZapper, contracts.bLusdAmm) + : new Map(); + }, + [contracts.bLusdAmmZapper, contracts.bLusdAmm] + ); + + const selectedBond = useMemo(() => bonds?.find(bond => bond.id === selectedBondId), [ + bonds, + selectedBondId + ]); + + const dispatchEvent = useCallback( + async (event: BondEvent, payload?: Payload) => { + if (!isValidEvent(viewRef.current, event)) { + console.error("invalid event", event, payload, "in view", viewRef.current); + return; + } + + const nextView = transition(viewRef.current, event); + setView(nextView); + + if (payload && "bondId" in payload && payload.bondId !== selectedBondId) { + setSelectedBondId(payload.bondId); + } + + if (payload && "inputToken" in payload && payload.inputToken !== inputToken) { + setInputToken(payload.inputToken); + } + + const isCurrentViewEvent = (_view: BondView, _event: BondEvent) => + viewRef.current === _view && event === _event; + + try { + if (isCurrentViewEvent("CREATING", "CONFIRM_PRESSED")) { + await createBond((payload as CreateBondPayload).deposit); + await dispatchEvent("CREATE_BOND_CONFIRMED"); + } else if (isCurrentViewEvent("CANCELLING", "CONFIRM_PRESSED")) { + if (selectedBond === undefined) { + console.error( + "dispatchEvent() handler: attempted to cancel a bond without selecting a bond" + ); + return; + } + await cancelBond(selectedBond.id, selectedBond.deposit); + await dispatchEvent("CANCEL_BOND_CONFIRMED"); + } else if (isCurrentViewEvent("CLAIMING", "CONFIRM_PRESSED")) { + if (selectedBond === undefined) { + console.error( + "dispatchEvent() handler: attempted to claim a bond without selecting a bond" + ); + return; + } + await claimBond(selectedBond.id); + await dispatchEvent("CLAIM_BOND_CONFIRMED"); + } else if (isCurrentViewEvent("SWAPPING", "APPROVE_PRESSED")) { + await approveAmm([inputToken]); + } else if (isCurrentViewEvent("SWAPPING", "CONFIRM_PRESSED")) { + const { inputAmount, minOutputAmount } = payload as SwapPayload; + await swapTokens(inputToken, inputAmount, minOutputAmount); + await dispatchEvent("SWAP_CONFIRMED"); + } else if (isCurrentViewEvent("MANAGING_LIQUIDITY", "APPROVE_PRESSED")) { + await approveTokens(payload as ApprovePressedPayload); + } else if (isCurrentViewEvent("MANAGING_LIQUIDITY", "CONFIRM_PRESSED")) { + await manageLiquidity(payload as ManageLiquidityPayload); + await dispatchEvent("MANAGE_LIQUIDITY_CONFIRMED"); + } + } catch (error: unknown) { + console.error("dispatchEvent(), event handler failed\n\n", error); + } + }, + [ + selectedBondId, + cancelBond, + createBond, + claimBond, + selectedBond, + approveAmm, + approveTokens, + swapTokens, + inputToken, + manageLiquidity + ] + ); + + useEffect(() => { + setStatuses(statuses => ({ + ...statuses, + CREATE: createStatus, + CANCEL: cancelStatus, + CLAIM: claimStatus, + APPROVE_AMM: approveAmmStatus, + APPROVE_SPENDER: approveTokensStatus, + SWAP: swapStatus, + MANAGE_LIQUIDITY: manageLiquidityStatus + })); + }, [ + createStatus, + cancelStatus, + claimStatus, + approveAmmStatus, + approveTokensStatus, + swapStatus, + manageLiquidityStatus + ]); + + useEffect(() => { + viewRef.current = view; + }, [view]); + + useEffect(() => { + (async () => { + if ( + bonds === undefined || + protocolInfo === undefined || + contracts.chickenBondManager === undefined + ) + return; + + if (protocolInfo.bLusdSupply.gt(0)) { + setIsBootstrapPeriodActive(false); + return; + } + + const bootstrapPeriodMs = + (await contracts.chickenBondManager.BOOTSTRAP_PERIOD_CHICKEN_IN()).toNumber() * 1000; + + const anyBondOlderThanBootstrapPeriod = + bonds.find(bond => Date.now() - bond.startTime > bootstrapPeriodMs) !== undefined; + + setIsBootstrapPeriodActive(!anyBondOlderThanBootstrapPeriod); + })(); + }, [bonds, protocolInfo, contracts.chickenBondManager]); + + const provider: BondViewContextType = { + view, + dispatchEvent, + selectedBondId, + optimisticBond, + protocolInfo, + stats, + bonds, + statuses, + selectedBond, + bLusdBalance, + lusdBalance, + lpTokenBalance, + stakedLpTokenBalance, + lpTokenSupply, + bLusdAmmBLusdBalance, + bLusdAmmLusdBalance, + isSynchronizing, + getLusdFromFaucet, + setSimulatedMarketPrice, + resetSimulatedMarketPrice, + simulatedProtocolInfo, + hasFoundContracts: contracts.hasFoundContracts, + isBLusdApprovedWithBlusdAmm, + isLusdApprovedWithBlusdAmm, + isLusdApprovedWithAmmZapper, + isBLusdApprovedWithAmmZapper, + isBLusdLpApprovedWithAmmZapper, + isBLusdLpApprovedWithGauge, + inputToken, + isInputTokenApprovedWithBLusdAmm: + inputToken === BLusdAmmTokenIndex.BLUSD + ? isBLusdApprovedWithBlusdAmm + : isLusdApprovedWithBlusdAmm, + getExpectedSwapOutput, + getExpectedLpTokens, + getExpectedWithdrawal, + isBootstrapPeriodActive, + hasLoaded: protocolInfo !== undefined && bonds !== undefined, + addresses: contracts.addresses, + lpRewards + }; + + // @ts-ignore + window.__LIQUITY_BONDS__ = provider.current; + + return {children}; +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/BondsProvider.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondsProvider.tsx new file mode 100644 index 0000000..3da4afc --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/BondsProvider.tsx @@ -0,0 +1,10 @@ +import { BondAddressesProvider } from "./BondAddressesContext"; +import { BondViewProvider } from "./BondViewProvider"; + +export const BondsProvider: React.FC = ({ children }) => { + return ( + + {children} + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/api.ts b/Templates/liquity-dev-frontend/src/components/Bonds/context/api.ts new file mode 100644 index 0000000..dc6c0f9 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/api.ts @@ -0,0 +1,1261 @@ +import { + BigNumber, + BigNumberish, + CallOverrides, + constants, + Contract, + ContractTransaction, + providers, + Signer +} from "ethers"; +import { splitSignature } from "ethers/lib/utils"; +import type { + BLUSDToken, + BondNFT, + ChickenBondManager, + BLUSDLPZap +} from "@liquity/chicken-bonds/lusd/types"; +import { + CurveCryptoSwap2ETH, + CurveRegistrySwaps__factory +} from "@liquity/chicken-bonds/lusd/types/external"; +import type { + BondCreatedEventObject, + BondCreatedEvent, + BondCancelledEventObject, + BondCancelledEvent, + BondClaimedEventObject, + BondClaimedEvent +} from "@liquity/chicken-bonds/lusd/types/ChickenBondManager"; +import { Decimal } from "@liquity/lib-base"; +import type { LUSDToken } from "@liquity/lib-ethers/dist/types"; +import type { ProtocolInfo, Bond, BondStatus, Stats, Maybe, BLusdLpRewards } from "./transitions"; +import { + numberify, + decimalify, + getBondAgeInDays, + milliseconds, + toFloat, + getReturn, + getTokenUri, + getFutureBLusdAccrualFactor, + getRebondPeriodInDays, + getBreakEvenPeriodInDays, + getAverageBondAgeInSeconds, + getRemainingRebondOrBreakEvenDays, + getRebondOrBreakEvenTimeWithControllerAdjustment, + getFloorPrice +} from "../utils"; +import { UNKNOWN_DATE } from "../../HorizontalTimeline"; +import { BLusdAmmTokenIndex } from "./transitions"; +import { + TokenExchangeEvent, + TokenExchangeEventObject +} from "@liquity/chicken-bonds/lusd/types/external/CurveCryptoSwap2ETH"; +import type { EthersSigner } from "@liquity/lib-ethers"; +import mainnet from "@liquity/chicken-bonds/lusd/addresses/mainnet.json"; +import type { + CurveLiquidityGaugeV5, + DepositEvent, + DepositEventObject, + WithdrawEvent, + WithdrawEventObject +} from "@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5"; + +const BOND_STATUS: BondStatus[] = ["NON_EXISTENT", "PENDING", "CANCELLED", "CLAIMED"]; + +const LUSD_3CRV_POOL_ADDRESS = "0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA"; +const LUSD_TOKEN_ADDRESS = "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0"; +const CURVE_REGISTRY_SWAPS_ADDRESS = "0x81C46fECa27B31F3ADC2b91eE4be9717d1cd3DD7"; +const BLUSD_LUSD_3CRV_POOL_ADDRESS = "0x74ED5d42203806c8CDCf2F04Ca5F60DC777b901c"; +const CRV_TOKEN_ADDRESS = "0xD533a949740bb3306d119CC777fa900bA034cd52"; + +const TOKEN_ADDRESS_NAME_MAP: Record = { + [LUSD_TOKEN_ADDRESS]: "LUSD", + [CRV_TOKEN_ADDRESS]: "CRV" +}; + +const LQTY_ISSUANCE_GAS_HEADROOM = BigNumber.from(50000); + +// [ +// token_1, +// pool_1, +// token_2, +// pool_2, +// ... +// pool_{n-1}, +// token_{n} +// ] +const bLusdToLusdRoute: [string, string, string, string, string] = [ + mainnet.BLUSD_TOKEN_ADDRESS ?? "", + mainnet.BLUSD_AMM_ADDRESS ?? "", + LUSD_3CRV_POOL_ADDRESS, // LP token of LUSD-3Crv-f has same address as pool + LUSD_3CRV_POOL_ADDRESS, + LUSD_TOKEN_ADDRESS +]; + +const lusdToBLusdRoute = [...bLusdToLusdRoute].reverse() as typeof bLusdToLusdRoute; + +type RouteAddresses = [string, string, string, string, string, string, string, string, string]; +type RouteSwapParams = [BigNumberish, BigNumberish, BigNumberish]; +type RouteSwaps = [RouteSwapParams, RouteSwapParams, RouteSwapParams, RouteSwapParams]; + +const getRoute = (inputToken: BLusdAmmTokenIndex): [RouteAddresses, RouteSwaps] => [ + [ + ...(inputToken === BLusdAmmTokenIndex.BLUSD ? bLusdToLusdRoute : lusdToBLusdRoute), + constants.AddressZero, + constants.AddressZero, + constants.AddressZero, + constants.AddressZero + ], + [ + // Params: + // 1) input token index (unused by remove_liquidity_one_coin()) + // 2) output token index (unused by add_liquidity()) + // 3) function to call (see below) + // + // Functions: + // 3 = exchange() in crypto pool + // 6 = add_liquidity() single-sidedly to 2-pool + // 9 = remove_liquidity_one_coin() + // + // Indices: + // - bLUSD pool: { 0: bLUSD, 1: LUSD-3Crv-f } + // - LUSD-3Crv-f pool: { 0: LUSD, 1: 3Crv } + + // bLUSD LUSD + inputToken === BLusdAmmTokenIndex.BLUSD ? [0, 1, 3] : [0, 0, 6], // step 1 + inputToken === BLusdAmmTokenIndex.BLUSD ? [0, 0, 9] : [1, 0, 3], // step 2 + [0, 0, 0], // LUSD bLUSD + [0, 0, 0] + ] +]; + +type CachedYearnApys = { + lusd3Crv: Decimal | undefined; + stabilityPool: Decimal | undefined; + bLusdLusd3Crv: Decimal | undefined; +}; + +let cachedApys: CachedYearnApys = { + lusd3Crv: undefined, + stabilityPool: undefined, + bLusdLusd3Crv: undefined +}; + +type YearnVault = Partial<{ + token: { + address: string; + }; + apy: { + net_apy: number; + }; +}>; + +type CurvePoolData = Partial<{ + data: { + poolData: Array<{ id: string; gaugeRewards: Array<{ apy: number }> }>; + }; +}>; + +type CurvePoolDetails = Partial<{ + data: { + poolDetails: Array<{ poolAddress: string; apy: number }>; + }; +}>; + +const CURVE_POOL_ID = "factory-crypto-134"; + +const cacheCurveLpApy = async (): Promise => { + try { + const curvePoolDataResponse = (await ( + await window.fetch("https://api.curve.fi/api/getPools/ethereum/factory-crypto") + ).json()) as CurvePoolData; + + const curvePoolDetailsResponse = (await await ( + await window.fetch("https://api.curve.fi/api/getFactoryAPYs?version=crypto") + ).json()) as CurvePoolDetails; + + const poolData = curvePoolDataResponse.data?.poolData.find(pool => pool.id === CURVE_POOL_ID); + const rewardsApr = poolData?.gaugeRewards.reduce((total, current) => total + current.apy, 0); + const baseApr = curvePoolDetailsResponse?.data?.poolDetails?.find( + pool => pool.poolAddress === BLUSD_LUSD_3CRV_POOL_ADDRESS + )?.apy; + + if (rewardsApr === undefined && baseApr === undefined) return; + + const apr = (rewardsApr ?? 0) + (baseApr ?? 0); + + cachedApys.bLusdLusd3Crv = Decimal.from(apr); + } catch (error: unknown) { + console.log("cacheCurveLpApy failed"); + console.error(error); + } +}; + +const cacheYearnVaultApys = async (): Promise => { + try { + if (cachedApys.lusd3Crv !== undefined) return; + + const yearnResponse = (await ( + await window.fetch("https://api.yearn.finance/v1/chains/1/vaults/all") + ).json()) as YearnVault[]; + + const lusd3CrvVault = yearnResponse.find( + vault => vault?.token?.address === LUSD_3CRV_POOL_ADDRESS + ); + + const stabilityPoolVault = yearnResponse.find( + vault => vault?.token?.address === LUSD_TOKEN_ADDRESS + ); + + if ( + lusd3CrvVault?.apy?.net_apy === undefined || + stabilityPoolVault?.apy?.net_apy === undefined + ) { + return; + } + + cachedApys.lusd3Crv = Decimal.from(lusd3CrvVault.apy.net_apy); + cachedApys.stabilityPool = Decimal.from(stabilityPoolVault.apy.net_apy); + } catch (error: unknown) { + console.log("cacheYearnVaultApys failed"); + console.error(error); + } +}; + +const getAccountBonds = async ( + account: string, + bondNft: BondNFT, + chickenBondManager: ChickenBondManager, + protocolInfo: ProtocolInfo +): Promise => { + try { + const { + marketPrice, + alphaAccrualFactor, + marketPricePremium, + claimBondFee, + floorPrice, + controllerTargetAge, + averageBondAge + } = protocolInfo; + + const totalBonds = (await bondNft.balanceOf(account)).toNumber(); + + const bondIdRequests = Array.from(Array(totalBonds)).map((_, index) => + bondNft.tokenOfOwnerByIndex(account, index) + ); + + const bondIds = await Promise.all(bondIdRequests); + + const bondRequests = { + deposits: bondIds.map(bondId => bondNft.getBondAmount(bondId)), + accrueds: bondIds.map(bondId => chickenBondManager.calcAccruedBLUSD(bondId)), + startTimes: bondIds.map(bondId => bondNft.getBondStartTime(bondId)), + endTimes: bondIds.map(bondId => bondNft.getBondEndTime(bondId)), + statuses: bondIds.map(bondId => bondNft.getBondStatus(bondId)), + tokenUris: bondIds.map(bondId => bondNft.tokenURI(bondId)), + claimedAmounts: bondIds.map(bondId => bondNft.getBondClaimedBLUSD(bondId)) + }; + + const bondDeposits = await Promise.all(bondRequests.deposits); + const bondAccrueds = await Promise.all(bondRequests.accrueds); + const bondStartTimes = await Promise.all(bondRequests.startTimes); + const bondEndTimes = await Promise.all(bondRequests.endTimes); + const bondStatuses = await Promise.all(bondRequests.statuses); + const bondTokenUris = await Promise.all(bondRequests.tokenUris); + const bondClaimedAmounts = await Promise.all(bondRequests.claimedAmounts); + + const bonds = bondIds + .reduce((accumulator, _, idx) => { + const id = numberify(bondIds[idx]).toString(); + const deposit = decimalify(bondDeposits[idx]); + const accrued = decimalify(bondAccrueds[idx]); + const startTime = milliseconds(numberify(bondStartTimes[idx])); + const endTime = milliseconds(numberify(bondEndTimes[idx])); + const status = BOND_STATUS[bondStatuses[idx]]; + const tokenUri = getTokenUri(bondTokenUris[idx]); + const bondAgeInDays = getBondAgeInDays(startTime); + const rebondPeriodInDays = getRebondPeriodInDays( + alphaAccrualFactor, + marketPricePremium, + claimBondFee + ); + const bondAgeInSeconds = Decimal.from(Date.now() - startTime).div(1000); + const remainingRebondDays = getRemainingRebondOrBreakEvenDays( + bondAgeInSeconds, + controllerTargetAge, + averageBondAge, + rebondPeriodInDays + ); + + const breakEvenPeriodInDays = getBreakEvenPeriodInDays( + alphaAccrualFactor, + marketPricePremium, + claimBondFee + ); + const remainingBreakEvenDays = getRemainingRebondOrBreakEvenDays( + bondAgeInSeconds, + controllerTargetAge, + averageBondAge, + breakEvenPeriodInDays + ); + + const depositMinusClaimBondFee = Decimal.ONE.sub(claimBondFee).mul(deposit); + const rebondAccrual = + rebondPeriodInDays === Decimal.INFINITY + ? Decimal.INFINITY + : getFutureBLusdAccrualFactor(floorPrice, rebondPeriodInDays, alphaAccrualFactor).mul( + depositMinusClaimBondFee + ); + + const breakEvenAccrual = + breakEvenPeriodInDays === Decimal.INFINITY + ? Decimal.INFINITY + : getFutureBLusdAccrualFactor(floorPrice, breakEvenPeriodInDays, alphaAccrualFactor).mul( + depositMinusClaimBondFee + ); + + const breakEvenTime = + breakEvenPeriodInDays === Decimal.INFINITY + ? UNKNOWN_DATE + : getRebondOrBreakEvenTimeWithControllerAdjustment( + bondAgeInSeconds, + controllerTargetAge, + averageBondAge, + breakEvenPeriodInDays + ); + + const rebondTime = + rebondPeriodInDays === Decimal.INFINITY + ? UNKNOWN_DATE + : getRebondOrBreakEvenTimeWithControllerAdjustment( + bondAgeInSeconds, + controllerTargetAge, + averageBondAge, + rebondPeriodInDays + ); + + const marketValue = decimalify(bondAccrueds[idx]).mul(marketPrice); + + // Accrued bLUSD is 0 for cancelled/claimed bonds + const claimNowReturn = accrued.isZero ? 0 : getReturn(accrued, deposit, marketPrice); + const rebondReturn = accrued.isZero ? 0 : getReturn(rebondAccrual, deposit, marketPrice); + const rebondRoi = rebondReturn / toFloat(deposit); + const rebondApr = rebondRoi * (365 / (bondAgeInDays + remainingRebondDays)); + const claimedAmount = Decimal.from(numberify(bondClaimedAmounts[idx])); + + return [ + ...accumulator, + { + id, + deposit, + accrued, + startTime, + endTime, + status, + tokenUri, + breakEvenAccrual, + rebondAccrual, + breakEvenTime, + rebondTime, + marketValue, + rebondReturn, + claimNowReturn, + rebondRoi, + rebondApr, + claimedAmount, + bondAgeInDays, + remainingRebondDays, + remainingBreakEvenDays + } + ]; + }, []) + .sort((a, b) => (a.startTime > b.startTime ? -1 : a.startTime < b.startTime ? 1 : 0)); + + return bonds; + } catch (error: unknown) { + console.error(error); + } + return []; +}; + +export const _getProtocolInfo = ( + marketPrice: Decimal, + floorPrice: Decimal, + claimBondFee: Decimal, + alphaAccrualFactor: Decimal +) => { + const marketPricePremium = marketPrice.div(floorPrice); + const hasMarketPremium = marketPricePremium.mul(Decimal.ONE.sub(claimBondFee)).gt(Decimal.ONE); + + const breakEvenPeriodInDays = getBreakEvenPeriodInDays( + alphaAccrualFactor, + marketPricePremium, + claimBondFee + ); + const rebondPeriodInDays = getRebondPeriodInDays( + alphaAccrualFactor, + marketPricePremium, + claimBondFee + ); + const breakEvenAccrualFactor = getFutureBLusdAccrualFactor( + floorPrice, + breakEvenPeriodInDays, + alphaAccrualFactor + ); + const rebondAccrualFactor = getFutureBLusdAccrualFactor( + floorPrice, + rebondPeriodInDays, + alphaAccrualFactor + ); + + return { + marketPricePremium, + hasMarketPremium, + breakEvenAccrualFactor, + rebondAccrualFactor, + breakEvenPeriodInDays, + rebondPeriodInDays + }; +}; + +const marginalInputAmount = Decimal.ONE.div(1000); + +const getBlusdAmmPrice = async (bLusdAmm: CurveCryptoSwap2ETH): Promise => { + try { + const marginalOutputAmount = await getExpectedSwapOutput( + BLusdAmmTokenIndex.BLUSD, + marginalInputAmount, + bLusdAmm + ); + + return marginalOutputAmount.div(marginalInputAmount); + } catch (error: unknown) { + console.error("bLUSD AMM get_dy() price failed, probably has no liquidity?", error); + } + + return Decimal.ONE.div(decimalify(await bLusdAmm.price_oracle())); +}; + +const getBlusdAmmPriceMainnet = async (bLusdAmm: CurveCryptoSwap2ETH): Promise => { + try { + const marginalOutputAmount = await getExpectedSwapOutputMainnet( + BLusdAmmTokenIndex.BLUSD, + marginalInputAmount, + bLusdAmm + ); + + return marginalOutputAmount.div(marginalInputAmount); + } catch (error: unknown) { + console.error("getExpectedSwapOutputMainnet() failed, probably no liquidity?", error); + } + + const lusd3CrvPool = new Contract( + LUSD_3CRV_POOL_ADDRESS, + [ + "function calc_withdraw_one_coin(uint256 burn_amount, int128 i) external view returns (uint256)" + ], + bLusdAmm.provider + ); + + const [oraclePrice, marginalOutputAmount] = await Promise.all([ + bLusdAmm.price_oracle().then(decimalify), + lusd3CrvPool.calc_withdraw_one_coin(marginalInputAmount.hex, 0 /* LUSD */).then(decimalify) + ]); + + return marginalOutputAmount.div(marginalInputAmount).div(oraclePrice); +}; + +const getProtocolInfo = async ( + bLusdToken: BLUSDToken, + bLusdAmm: CurveCryptoSwap2ETH, + chickenBondManager: ChickenBondManager, + isMainnet: boolean +): Promise => { + // TS breaks when including this call, or any more than 10 elements, in the Promise.all below. + const bammLusdDebtRequest = chickenBondManager.getBAMMLUSDDebt().then(decimalify); + + const [ + bLusdSupply, + marketPrice, + _treasury, + protocolOwnedLusdInStabilityPool, + protocolLusdInCurve, + _floorPrice, + claimBondFee, + alphaAccrualFactor, + controllerTargetAge, + totalWeightedStartTimes + ] = await Promise.all([ + bLusdToken.totalSupply().then(decimalify), + isMainnet ? getBlusdAmmPriceMainnet(bLusdAmm) : getBlusdAmmPrice(bLusdAmm), + chickenBondManager.getTreasury().then(bucket => bucket.map(decimalify)), + chickenBondManager.getOwnedLUSDInSP().then(decimalify), + chickenBondManager.getTotalLUSDInCurve().then(decimalify), + chickenBondManager.calcSystemBackingRatio().then(decimalify), + chickenBondManager.CHICKEN_IN_AMM_FEE().then(decimalify), + chickenBondManager.calcUpdatedAccrualParameter().then(p => decimalify(p).div(24 * 60 * 60)), + chickenBondManager.targetAverageAgeSeconds().then(t => Decimal.from(t.toString())), + chickenBondManager.totalWeightedStartTimes().then(decimalify) + ]); + + const bammLusdDebt = await bammLusdDebtRequest; + + const treasury = { + pending: _treasury[0], + reserve: _treasury[1], + permanent: _treasury[2], + total: _treasury[0].add(_treasury[1]).add(_treasury[2]) + }; + + const cachedApysRequests = + cachedApys.lusd3Crv === undefined || + cachedApys.stabilityPool === undefined || + cachedApys.bLusdLusd3Crv === undefined + ? [cacheYearnVaultApys(), cacheCurveLpApy()] + : null; + + const protocolLusdInStabilityPool = treasury.pending.add(protocolOwnedLusdInStabilityPool); + + const floorPrice = bLusdSupply.isZero ? Decimal.ONE : _floorPrice; + + const floorPriceWithoutPendingHarvests = bLusdSupply.isZero + ? Decimal.ONE + : getFloorPrice( + bammLusdDebt, + protocolLusdInCurve, + treasury.pending, + treasury.permanent, + bLusdSupply + ); + + const averageBondAge = getAverageBondAgeInSeconds(totalWeightedStartTimes, treasury.pending); + + let yieldAmplification: Maybe = undefined; + let bLusdApr: Maybe = undefined; + let bLusdLpApr: Maybe = cachedApys.bLusdLusd3Crv; + + const fairPrice = { + lower: treasury.total.sub(treasury.pending).div(bLusdSupply), + upper: treasury.total.div(bLusdSupply) + }; + + const { + marketPricePremium, + hasMarketPremium, + breakEvenAccrualFactor, + rebondAccrualFactor, + breakEvenPeriodInDays, + rebondPeriodInDays + } = _getProtocolInfo(marketPrice, floorPrice, claimBondFee, alphaAccrualFactor); + + const simulatedMarketPrice = marketPrice; + + const windDownPrice = treasury.reserve.add(treasury.permanent).div(bLusdSupply); + + // We need to know APYs to calculate the stats below + if (cachedApysRequests) await Promise.all(cachedApysRequests); + + if ( + cachedApys.lusd3Crv !== undefined && + cachedApys.stabilityPool !== undefined && + treasury.reserve.gt(0) + ) { + const protocolStabilityPoolYield = cachedApys.stabilityPool.mul(protocolLusdInStabilityPool); + const protocolCurveYield = cachedApys.lusd3Crv.mul(protocolLusdInCurve); + bLusdApr = protocolStabilityPoolYield.add(protocolCurveYield).div(treasury.reserve); + yieldAmplification = bLusdApr.div(cachedApys.stabilityPool); + + fairPrice.lower = protocolLusdInStabilityPool + .sub(treasury.pending) + .add(protocolLusdInCurve.mul(cachedApys.lusd3Crv.div(cachedApys.stabilityPool))) + .div(bLusdSupply); + + fairPrice.upper = protocolLusdInStabilityPool + .add(protocolLusdInCurve.mul(cachedApys.lusd3Crv.div(cachedApys.stabilityPool))) + .div(bLusdSupply); + } + + return { + bLusdSupply, + marketPrice, + treasury, + fairPrice, + floorPrice, + claimBondFee, + alphaAccrualFactor, + marketPricePremium, + hasMarketPremium, + breakEvenAccrualFactor, + rebondAccrualFactor, + breakEvenPeriodInDays, + rebondPeriodInDays, + simulatedMarketPrice, + yieldAmplification, + bLusdApr, + bLusdLpApr, + controllerTargetAge, + averageBondAge, + floorPriceWithoutPendingHarvests, + windDownPrice + }; +}; + +const getStats = async (chickenBondManager: ChickenBondManager): Promise => { + const [pendingBonds, cancelledBonds, claimedBonds] = await Promise.all([ + chickenBondManager.getOpenBondCount(), + chickenBondManager.countChickenOut(), + chickenBondManager.countChickenIn() + ]); + + const totalBonds = pendingBonds.add(cancelledBonds).add(claimedBonds); + + return { + pendingBonds: Decimal.from(pendingBonds.toString()), + cancelledBonds: Decimal.from(cancelledBonds.toString()), + claimedBonds: Decimal.from(claimedBonds.toString()), + totalBonds: Decimal.from(totalBonds.toString()) + }; +}; + +// Very minimal type that only contains what we need +export interface ERC20 { + approve( + spender: string, + amount: BigNumber, + _overrides?: CallOverrides + ): Promise; + allowance(account: string, spender: string, _overrides?: CallOverrides): Promise; + balanceOf(account: string, _overrides?: CallOverrides): Promise; + totalSupply(_overrides?: CallOverrides): Promise; +} + +const erc20From = (tokenAddress: string, signerOrProvider: Signer | providers.Provider) => + (new Contract( + tokenAddress, + [ + "function approve(address spender, uint256 amount) returns (bool)", + "function allowance(address owner, address spender) view returns (uint256)", + "function balanceOf(address) view returns (uint256)", + "function totalSupply() view returns (uint256)" + ], + signerOrProvider + ) as unknown) as ERC20; + +const getLpToken = async (pool: CurveCryptoSwap2ETH) => + erc20From(await pool.token(), pool.signer ?? pool.provider); + +const getTokenBalance = async (account: string, token: ERC20): Promise => { + return decimalify(await token.balanceOf(account)); +}; + +const getTokenTotalSupply = async (token: ERC20): Promise => { + return decimalify(await token.totalSupply()); +}; + +const createBond = async ( + lusdAmount: Decimal, + owner: string, + lusdAddress: string, + lusdToken: LUSDToken | undefined, + chickenBondManager: ChickenBondManager | undefined, + signer: EthersSigner +): Promise => { + if (chickenBondManager === undefined || lusdToken === undefined) { + throw new Error("createBond() failed: a dependency is null"); + } + + const TEN_MINUTES_IN_SECONDS = 60 * 10; + const spender = chickenBondManager.address; + const deadline = Math.round(Date.now() / 1000) + TEN_MINUTES_IN_SECONDS; + const nonce = (await lusdToken.nonces(owner)).toNumber(); + const domain = { + name: await lusdToken.name(), + version: "1", + chainId: await signer.getChainId(), + verifyingContract: lusdAddress + }; + const types = { + Permit: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + { name: "value", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + }; + const message = { + owner, + spender, + value: lusdAmount.hex, + nonce, + deadline + }; + + // @ts-ignore - Ethers private func as API not stable yet + const signature = await signer._signTypedData(domain, types, message); + + const { v, r, s } = splitSignature(signature); + + const gasEstimate = await chickenBondManager.estimateGas.createBondWithPermit( + owner, + lusdAmount.hex, + deadline, + v, + r, + s + ); + + const receipt = await ( + await chickenBondManager.createBondWithPermit(owner, lusdAmount.hex, deadline, v, r, s, { + gasLimit: gasEstimate.add(LQTY_ISSUANCE_GAS_HEADROOM) + }) + ).wait(); + + console.log( + "CREATE BOND", + receipt?.events, + receipt?.events?.map(c => c.event), + receipt?.events?.find(e => e.event === "BondCreated") + ); + const createdEvent = receipt?.events?.find( + e => e.event === "BondCreated" + ) as Maybe; + + if (createdEvent === undefined) { + throw new Error("createBond() failed: couldn't find BondCreated event"); + } + + console.log("createBond() finished:", createdEvent.args); + return createdEvent.args; +}; + +const cancelBond = async ( + bondId: string, + minimumLusd: Decimal, + chickenBondManager: ChickenBondManager | undefined +): Promise => { + if (chickenBondManager === undefined) throw new Error("cancelBond() failed: a dependency is null"); + console.log("cancelBond() started:", bondId, minimumLusd.toString()); + + const gasEstimate = await chickenBondManager.estimateGas.chickenOut(bondId, minimumLusd.hex); + + const receipt = await ( + await chickenBondManager.chickenOut(bondId, minimumLusd.hex, { + gasLimit: gasEstimate.add(LQTY_ISSUANCE_GAS_HEADROOM) + }) + ).wait(); + + const cancelledEvent = receipt?.events?.find( + e => e.event === "BondCancelled" + ) as Maybe; + + if (cancelledEvent === undefined) { + throw new Error("cancelBond() failed: couldn't find BondCancelled event"); + } + console.log("cancelBond() finished:", cancelledEvent.args); + return cancelledEvent.args; +}; + +const claimBond = async ( + bondId: string, + chickenBondManager: ChickenBondManager | undefined +): Promise => { + try { + if (chickenBondManager === undefined) + throw new Error("claimBond() failed: a dependency is null"); + console.log("claimBond() started", bondId); + + const gasEstimate = await chickenBondManager.estimateGas.chickenIn(bondId); + + const receipt = await ( + await chickenBondManager.chickenIn(bondId, { + gasLimit: gasEstimate.add(LQTY_ISSUANCE_GAS_HEADROOM) + }) + ).wait(); + + const bondClaimedEvent = receipt.events?.find( + e => e.event === "BondClaimed" + ) as Maybe; + + if (bondClaimedEvent === undefined) { + throw new Error("claimBond() failed: couldn't find BondClaimed event"); + } + + console.log("claimBond() finished", bondClaimedEvent.args); + return bondClaimedEvent.args; + } catch (error: unknown) { + console.error("claimBond() failed:", error); + throw error; + } +}; + +const isTokenApprovedWithBLusdAmm = async ( + account: string, + token: LUSDToken | BLUSDToken, + bLusdAmmAddress: string | null +): Promise => { + if (bLusdAmmAddress === null) { + throw new Error("isTokenApprovedWithBLusdAmm() failed: a dependency is null"); + } + + const allowance = await token.allowance(account, bLusdAmmAddress); + + // Unlike bLUSD, LUSD doesn't explicitly handle infinite approvals, therefore the allowance will + // start to decrease from 2**64. + // However, it is practically impossible that it would decrease below 2**63. + return allowance.gt(constants.MaxInt256); +}; + +const isTokenApprovedWithBLusdAmmMainnet = async ( + account: string, + token: LUSDToken | BLUSDToken +): Promise => { + const allowance = await token.allowance(account, CURVE_REGISTRY_SWAPS_ADDRESS); + + // Unlike bLUSD, LUSD doesn't explicitly handle infinite approvals, therefore the allowance will + // start to decrease from 2**64. + // However, it is practically impossible that it would decrease below 2**63. + return allowance.gt(constants.MaxInt256); +}; + +const isTokenApprovedWithAmmZapper = async ( + account: string, + token: LUSDToken | BLUSDToken | ERC20, + ammZapperAddress: string | null +): Promise => { + if (ammZapperAddress === null) { + throw new Error("isTokenApprovedWithAmmZapper() failed: a dependency is null"); + } + const allowance = await token.allowance(account, ammZapperAddress); + return allowance.gt(constants.MaxInt256); +}; + +const approveTokenWithBLusdAmm = async ( + token: LUSDToken | BLUSDToken | undefined, + bLusdAmmAddress: string | null +) => { + if (token === undefined || bLusdAmmAddress === null) { + throw new Error("approveTokenWithBLusdAmm() failed: a dependency is null"); + } + + await (await token.approve(bLusdAmmAddress, constants.MaxUint256)).wait(); + return; +}; + +const approveToken = async ( + token: LUSDToken | BLUSDToken | ERC20 | undefined, + spenderAddress: string | null +) => { + if (token === undefined || spenderAddress === null) { + throw new Error("approveToken() failed: a dependency is null"); + } + + await (await token.approve(spenderAddress, constants.MaxUint256)).wait(); + return; +}; + +const approveTokenWithBLusdAmmMainnet = async (token: LUSDToken | BLUSDToken | undefined) => { + if (token === undefined) { + throw new Error("approveTokenWithBLusdAmmMainnet() failed: a dependency is null"); + } + + await (await token.approve(CURVE_REGISTRY_SWAPS_ADDRESS, constants.MaxUint256)).wait(); + return; +}; + +const getOtherToken = (thisToken: BLusdAmmTokenIndex) => + thisToken === BLusdAmmTokenIndex.BLUSD ? BLusdAmmTokenIndex.LUSD : BLusdAmmTokenIndex.BLUSD; + +const getExpectedSwapOutput = async ( + inputToken: BLusdAmmTokenIndex, + inputAmount: Decimal, + bLusdAmm: CurveCryptoSwap2ETH +): Promise => + decimalify(await bLusdAmm.get_dy(inputToken, getOtherToken(inputToken), inputAmount.hex)); + +const getExpectedSwapOutputMainnet = async ( + inputToken: BLusdAmmTokenIndex, + inputAmount: Decimal, + bLusdAmm: CurveCryptoSwap2ETH +): Promise => { + const bLusdAmmBalance = await bLusdAmm.balances(0); + // Initial Curve bLUSD price before liquidity = 1.29, reciprocal expected + const reciprocal = Decimal.from(1).div(1.29); + if (bLusdAmmBalance.eq(0)) return inputAmount.div(reciprocal); + + const swaps = CurveRegistrySwaps__factory.connect(CURVE_REGISTRY_SWAPS_ADDRESS, bLusdAmm.signer); + + return decimalify( + await swaps["get_exchange_multiple_amount(address[9],uint256[3][4],uint256)"]( + ...getRoute(inputToken), + inputAmount.hex + ) + ); +}; + +const swapTokens = async ( + inputToken: BLusdAmmTokenIndex, + inputAmount: Decimal, + minOutputAmount: Decimal, + bLusdAmm: CurveCryptoSwap2ETH | undefined +): Promise => { + if (bLusdAmm === undefined) throw new Error("swapTokens() failed: a dependency is null"); + + const gasEstimate = await bLusdAmm.estimateGas["exchange(uint256,uint256,uint256,uint256)"]( + inputToken, + getOtherToken(inputToken), + inputAmount.hex, + minOutputAmount.hex + ); + + const receipt = await ( + await bLusdAmm["exchange(uint256,uint256,uint256,uint256)"]( + inputToken, + getOtherToken(inputToken), + inputAmount.hex, + minOutputAmount.hex, + { gasLimit: gasEstimate.mul(6).div(5) } // Add 20% overhead (we've seen it fail otherwise) + ) + ).wait(); + + const exchangeEvent = receipt?.events?.find( + e => e.event === "TokenExchange" + ) as Maybe; + + if (exchangeEvent === undefined) { + throw new Error("swapTokens() failed: couldn't find TokenExchange event"); + } + + console.log("swapTokens() finished:", exchangeEvent.args); + return exchangeEvent.args; +}; + +const swapTokensMainnet = async ( + inputToken: BLusdAmmTokenIndex, + inputAmount: Decimal, + minOutputAmount: Decimal, + bLusdAmm: CurveCryptoSwap2ETH | undefined +): Promise => { + if (bLusdAmm === undefined) throw new Error("swapTokensMainnet() failed: a dependency is null"); + + const swaps = CurveRegistrySwaps__factory.connect(CURVE_REGISTRY_SWAPS_ADDRESS, bLusdAmm.signer); + const route = getRoute(inputToken); + + const gasEstimate = await swaps.estimateGas[ + "exchange_multiple(address[9],uint256[3][4],uint256,uint256)" + ](...route, inputAmount.hex, minOutputAmount.hex); + + const receipt = await ( + await swaps["exchange_multiple(address[9],uint256[3][4],uint256,uint256)"]( + ...route, + inputAmount.hex, + minOutputAmount.hex, + { gasLimit: gasEstimate.mul(6).div(5) } // Add 20% overhead (we've seen it fail otherwise) + ) + ).wait(); + + if (!receipt.status) { + throw new Error("swapTokensMainnet() failed"); + } + + console.log("swapTokensMainnet() finished"); +}; + +const getExpectedLpTokensAmountViaZapper = async ( + bLusdAmount: Decimal, + lusdAmount: Decimal, + bLusdZapper: BLUSDLPZap +): Promise => { + // allow 0.1% rounding error + return decimalify(await bLusdZapper.getMinLPTokens(bLusdAmount.hex, lusdAmount.hex)).mul(0.99); +}; + +const getExpectedLpTokens = async ( + bLusdAmount: Decimal, + lusdAmount: Decimal, + bLusdZapper: BLUSDLPZap +): Promise => { + // Curve's calc_token_amount has rounding errors and they enforce a minimum 0.1% slippage + let expectedLpTokenAmount = Decimal.ZERO; + try { + // If the user is depositing bLUSD single sided, they won't have approved any.. WONT-FIX + expectedLpTokenAmount = await getExpectedLpTokensAmountViaZapper( + bLusdAmount, + lusdAmount, + bLusdZapper + ); + } catch { + // Curve throws if there's no liquidity + return expectedLpTokenAmount; + } + return expectedLpTokenAmount; +}; + +const addLiquidity = async ( + bLusdAmount: Decimal, + lusdAmount: Decimal, + minLpTokens: Decimal, + shouldStakeInGauge: boolean, + bLusdZapper: BLUSDLPZap | undefined +): Promise => { + if (bLusdZapper === undefined) throw new Error("addLiquidity() failed: a dependency is null"); + + const zapperFunction = shouldStakeInGauge ? "addLiquidityAndStake" : "addLiquidity"; + + const gasEstimate = await bLusdZapper.estimateGas[zapperFunction]( + bLusdAmount.hex, + lusdAmount.hex, + minLpTokens.hex + ); + + const receipt = await ( + await bLusdZapper[zapperFunction]( + bLusdAmount.hex, + lusdAmount.hex, + minLpTokens.hex, + { gasLimit: gasEstimate.mul(6).div(5) } // Add 20% overhead (we've seen it fail otherwise) + ) + ).wait(); + + if (!receipt.status) { + throw new Error("addLiquidity() failed"); + } + + console.log("addLiquidity() finished"); +}; + +const getCoinBalances = (pool: CurveCryptoSwap2ETH) => + Promise.all([pool.balances(0).then(decimalify), pool.balances(1).then(decimalify)]); + +const getExpectedWithdrawal = async ( + burnLp: Decimal, + output: BLusdAmmTokenIndex | "both", + bLusdZapper: BLUSDLPZap, + bLusdAmm: CurveCryptoSwap2ETH +): Promise> => { + if (output === "both") { + const [bLusdAmount, lusdAmount] = await bLusdZapper.getMinWithdrawBalanced(burnLp.hex); + + return new Map([ + [BLusdAmmTokenIndex.BLUSD, decimalify(bLusdAmount)], + [BLusdAmmTokenIndex.LUSD, decimalify(lusdAmount)] + ]); + } else { + const withdrawEstimatorFunction = + output === BLusdAmmTokenIndex.LUSD + ? () => bLusdZapper.getMinWithdrawLUSD(burnLp.hex) + : () => bLusdAmm.calc_withdraw_one_coin(burnLp.hex, 0); + return new Map([[output, await withdrawEstimatorFunction().then(decimalify)]]); + } +}; + +const removeLiquidity = async ( + burnLpTokens: Decimal, + minBLusdAmount: Decimal, + minLusdAmount: Decimal, + bLusdZapper: BLUSDLPZap | undefined +): Promise => { + if (bLusdZapper === undefined) throw new Error("removeLiquidity() failed: a dependency is null"); + + const receipt = await ( + await bLusdZapper.removeLiquidityBalanced( + burnLpTokens.hex, + minBLusdAmount.hex, + minLusdAmount.hex + ) + ).wait(); + + if (!receipt.status) { + throw new Error("removeLiquidity() failed"); + } + + console.log("removeLiquidity() finished"); +}; + +const removeLiquidityLUSD = async ( + burnLpTokens: Decimal, + minAmount: Decimal, + bLusdZapper: BLUSDLPZap | undefined +): Promise => { + if (bLusdZapper === undefined) + throw new Error("removeLiquidityLUSD() failed: a dependency is null"); + + const removeLiquidityFunction = "removeLiquidityLUSD"; + + const gasEstimate = await bLusdZapper.estimateGas[removeLiquidityFunction]( + burnLpTokens.hex, + minAmount.hex + ); + + const receipt = await ( + await bLusdZapper[removeLiquidityFunction]( + burnLpTokens.hex, + minAmount.hex, + { gasLimit: gasEstimate.mul(6).div(5) } // Add 20% overhead (we've seen it fail otherwise) + ) + ).wait(); + + if (!receipt.status) { + throw new Error("removeLiquidityLUSD() failed"); + } + + console.log("removeLiquidityLUSD() finished"); +}; + +const removeLiquidityBLUSD = async ( + burnLpTokens: Decimal, + minAmount: Decimal, + bLusdAmm: CurveCryptoSwap2ETH | undefined +): Promise => { + if (bLusdAmm === undefined) throw new Error("removeLiquidityBLUSD() failed: a dependency is null"); + + const removeLiquidityFunction = "remove_liquidity_one_coin(uint256,uint256,uint256,bool)"; + + const gasEstimate = await bLusdAmm.estimateGas[removeLiquidityFunction]( + burnLpTokens.hex, + 0, + minAmount.hex, + false + ); + + const receipt = await ( + await bLusdAmm[removeLiquidityFunction]( + burnLpTokens.hex, + 0, + minAmount.hex, + false, + { gasLimit: gasEstimate.mul(6).div(5) } // Add 20% overhead (we've seen it fail otherwise) + ) + ).wait(); + + if (!receipt.status) { + throw new Error("removeLiquidityBLUSD() failed"); + } + + console.log("removeLiquidityBLUSD() finished"); +}; + +const removeLiquidityOneCoin = async ( + burnLpTokens: Decimal, + output: BLusdAmmTokenIndex, + minAmount: Decimal, + bLusdZapper: BLUSDLPZap | undefined, + bLusdAmm: CurveCryptoSwap2ETH | undefined +): Promise => { + if (output === BLusdAmmTokenIndex.LUSD) { + return removeLiquidityLUSD(burnLpTokens, minAmount, bLusdZapper); + } else { + return removeLiquidityBLUSD(burnLpTokens, minAmount, bLusdAmm); + } +}; + +const stakeLiquidity = async ( + stakeAmount: Decimal, + bLusdGauge: CurveLiquidityGaugeV5 | undefined +): Promise => { + if (bLusdGauge === undefined) { + throw new Error("stakeLiquidity() failed: a dependency is null"); + } + const receipt = await (await bLusdGauge["deposit(uint256)"](stakeAmount.hex)).wait(); + + const depositEvent = receipt?.events?.find(e => e?.event === "Deposit") as Maybe; + + if (depositEvent === undefined) { + throw new Error("stakeLiquidity() failed: couldn't find Withdraw event"); + } + + console.log("stakeLiquidity() finished:", depositEvent.args); + return depositEvent.args; +}; + +const unstakeLiquidity = async ( + unstakeAmount: Decimal, + bLusdGauge: CurveLiquidityGaugeV5 | undefined +): Promise => { + if (bLusdGauge === undefined) { + throw new Error("unstakeLiquidity() failed: a dependency is null"); + } + const claimRewards = true; + const receipt = await ( + await bLusdGauge["withdraw(uint256,bool)"](unstakeAmount.hex, claimRewards) + ).wait(); + + const withdrawEvent = receipt?.events?.find(e => e?.event === "Withdraw") as Maybe; + + if (withdrawEvent === undefined) { + throw new Error("unstakeLiquidity() failed: couldn't find Withdraw event"); + } + + console.log("unstakeLiquidity() finished:", withdrawEvent.args); + return withdrawEvent.args; +}; + +const claimLpRewards = async (bLusdGauge: CurveLiquidityGaugeV5 | undefined): Promise => { + if (bLusdGauge === undefined) { + throw new Error("claimLpRewards() failed: a dependency is null"); + } + + const receipt = await (await bLusdGauge["claim_rewards()"]()).wait(); + + if (!receipt.status) { + throw new Error("claimLpRewards() failed: no transaction receipt status received."); + } +}; + +const getLpRewards = async ( + account: string, + bLusdGauge: CurveLiquidityGaugeV5 +): Promise => { + let rewards: BLusdLpRewards = []; + + const totalRewardTokens = (await bLusdGauge.reward_count()).toNumber(); + + for (let tokenIndex = 0; tokenIndex < totalRewardTokens; tokenIndex++) { + const tokenAddress = await bLusdGauge.reward_tokens(tokenIndex); + const tokenRewards = decimalify(await bLusdGauge.claimable_reward(account, tokenAddress)); + const tokenName = + TOKEN_ADDRESS_NAME_MAP[tokenAddress] || + `${tokenAddress.slice(0, 5)}..${tokenAddress.slice(tokenAddress.length - 3)}`; + + rewards.push({ name: tokenName, address: tokenAddress, amount: tokenRewards }); + } + return rewards; +}; + +export const api = { + getAccountBonds, + getStats, + erc20From, + getLpToken, + getTokenBalance, + getTokenTotalSupply, + getProtocolInfo, + createBond, + cancelBond, + claimBond, + isTokenApprovedWithBLusdAmm, + isTokenApprovedWithBLusdAmmMainnet, + approveTokenWithBLusdAmm, + approveTokenWithBLusdAmmMainnet, + isTokenApprovedWithAmmZapper, + approveToken, + getExpectedSwapOutput, + getExpectedSwapOutputMainnet, + swapTokens, + swapTokensMainnet, + getCoinBalances, + getExpectedLpTokens, + addLiquidity, + getExpectedWithdrawal, + removeLiquidity, + removeLiquidityOneCoin, + stakeLiquidity, + unstakeLiquidity, + getLpRewards, + claimLpRewards +}; + +export type BondsApi = typeof api; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/transitions.ts b/Templates/liquity-dev-frontend/src/components/Bonds/context/transitions.ts new file mode 100644 index 0000000..cfdbe24 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/transitions.ts @@ -0,0 +1,260 @@ +import { Decimal } from "@liquity/lib-base"; + +type Idle = "IDLE"; +type Creating = "CREATING"; +type Cancelling = "CANCELLING"; +type Claiming = "CLAIMING"; +type Swapping = "SWAPPING"; +type ManagingLiquidity = "MANAGING_LIQUIDITY"; + +export type BondView = Idle | Creating | Cancelling | Claiming | Swapping | ManagingLiquidity; + +/* UI events */ +type CreateBondPressed = "CREATE_BOND_PRESSED"; +type CancelPressed = "ABORT_PRESSED"; +type BackPressed = "BACK_PRESSED"; +type ApprovePressed = "APPROVE_PRESSED"; +type ConfirmPressed = "CONFIRM_PRESSED"; +type CancelBondPressed = "CANCEL_BOND_PRESSED"; +type ClaimBondPressed = "CLAIM_BOND_PRESSED"; +type SwapPressed = "SWAP_PRESSED"; +type AddLiquidityPressed = "ADD_LIQUIDITY_PRESSED"; +type ManageLiquidityPressed = "MANAGE_LIQUIDITY_PRESSED"; + +/* On-chain events */ +type CreateBondConfirmed = "CREATE_BOND_CONFIRMED"; +type CancelBondConfirmed = "CANCEL_BOND_CONFIRMED"; +type ClaimBondConfirmed = "CLAIM_BOND_CONFIRMED"; +type SwapConfirmed = "SWAP_CONFIRMED"; +type ManageLiquidityConfirmed = "MANAGE_LIQUIDITY_CONFIRMED"; + +export type BondEvent = + | CreateBondPressed + | CancelBondPressed + | ClaimBondPressed + | SwapPressed + | AddLiquidityPressed + | ManageLiquidityPressed + | ApprovePressed + | ConfirmPressed + | CancelPressed + | BackPressed + | CreateBondConfirmed + | CancelBondConfirmed + | ClaimBondConfirmed + | SwapConfirmed + | ManageLiquidityConfirmed; + +type BondEventTransitions = Record>>; + +export const transitions: BondEventTransitions = { + IDLE: { + CREATE_BOND_PRESSED: "CREATING", + CANCEL_BOND_PRESSED: "CANCELLING", + CLAIM_BOND_PRESSED: "CLAIMING", + SWAP_PRESSED: "SWAPPING", + MANAGE_LIQUIDITY_PRESSED: "MANAGING_LIQUIDITY" + }, + CREATING: { + ABORT_PRESSED: "IDLE", + CREATE_BOND_CONFIRMED: "IDLE", + BACK_PRESSED: "IDLE", + CONFIRM_PRESSED: "CREATING" + }, + CLAIMING: { + ABORT_PRESSED: "IDLE", + BACK_PRESSED: "IDLE", + CONFIRM_PRESSED: "CLAIMING", + CLAIM_BOND_CONFIRMED: "IDLE" + }, + CANCELLING: { + ABORT_PRESSED: "IDLE", + BACK_PRESSED: "IDLE", + CONFIRM_PRESSED: "CANCELLING", + CANCEL_BOND_CONFIRMED: "IDLE" + }, + SWAPPING: { + ABORT_PRESSED: "IDLE", + BACK_PRESSED: "IDLE", + APPROVE_PRESSED: "SWAPPING", + CONFIRM_PRESSED: "SWAPPING", + SWAP_CONFIRMED: "IDLE" + }, + MANAGING_LIQUIDITY: { + ABORT_PRESSED: "IDLE", + BACK_PRESSED: "IDLE", + APPROVE_PRESSED: "MANAGING_LIQUIDITY", + CONFIRM_PRESSED: "MANAGING_LIQUIDITY", + MANAGE_LIQUIDITY_CONFIRMED: "IDLE" + } +}; + +export enum BLusdAmmTokenIndex { + BLUSD, + LUSD, + BLUSD_LUSD_LP +} + +export type CreateBondPayload = { deposit: Decimal }; + +export type SelectBondPayload = { bondId: string }; + +export type SwapPressedPayload = { + inputToken: BLusdAmmTokenIndex.BLUSD | BLusdAmmTokenIndex.LUSD; +}; + +export type SwapPayload = { + inputAmount: Decimal; + minOutputAmount: Decimal; +}; + +export type Address = string | null; + +export type Addresses = { + BLUSD_AMM_ADDRESS: Address; + BLUSD_AMM_STAKING_ADDRESS: Address; + BLUSD_TOKEN_ADDRESS: Address; + BOND_NFT_ADDRESS: Address; + CHICKEN_BOND_MANAGER_ADDRESS: Address; + LUSD_OVERRIDE_ADDRESS: Address; + BLUSD_LP_ZAP_ADDRESS: Address; +}; + +// This payload is only dispatched by "Manage liquidity" +export type ApprovePressedPayload = { + tokensNeedingApproval: Map; +}; + +export type AddLiquidityPayload = { + action: "addLiquidity"; + bLusdAmount: Decimal; + lusdAmount: Decimal; + minLpTokens: Decimal; + shouldStakeInGauge: boolean; +}; + +export type RemoveLiquidityPayload = { + action: "removeLiquidity"; + burnLpTokens: Decimal; + minBLusdAmount: Decimal; + minLusdAmount: Decimal; +}; + +export type RemoveLiquidityOneCoinPayload = { + action: "removeLiquidityOneCoin"; + burnLpTokens: Decimal; + output: BLusdAmmTokenIndex; + minAmount: Decimal; +}; + +export type StakeLiquidityPayload = { + action: "stakeLiquidity"; + stakeAmount: Decimal; +}; + +export type UnstakeLiquidityPayload = { + action: "unstakeLiquidity"; + unstakeAmount: Decimal; +}; + +export type ClaimLpRewardsPayload = { + action: "claimLpRewards"; +}; + +export type ManageLiquidityPayload = + | AddLiquidityPayload + | RemoveLiquidityPayload + | RemoveLiquidityOneCoinPayload + | StakeLiquidityPayload + | UnstakeLiquidityPayload + | ClaimLpRewardsPayload; + +export type Payload = + | CreateBondPayload + | SelectBondPayload + | SwapPressedPayload + | SwapPayload + | ApprovePressedPayload + | ManageLiquidityPayload; + +export type BondStatus = "NON_EXISTENT" | "PENDING" | "CANCELLED" | "CLAIMED"; + +export type Bond = { + id: string; + deposit: Decimal; + startTime: number; + endTime: number; + status: BondStatus; + tokenUri: string; + accrued: Decimal; + breakEvenAccrual: Decimal; + rebondAccrual: Decimal; + breakEvenTime: Date; + rebondTime: Date; + marketValue: Decimal; + rebondReturn: number; + rebondRoi: number; + rebondApr: number; + claimNowReturn: number; + claimedAmount?: Decimal; + bondAgeInDays: number; + remainingRebondDays: number; + remainingBreakEvenDays: number; +}; + +export type OptimisticBond = Pick; + +export type Treasury = { + pending: Decimal; + reserve: Decimal; + permanent: Decimal; + total: Decimal; +}; + +export type Stats = { + pendingBonds: Decimal; + cancelledBonds: Decimal; + claimedBonds: Decimal; + totalBonds: Decimal; +}; + +export type ProtocolInfo = { + treasury: Treasury; + bLusdSupply: Decimal; + marketPrice: Decimal; + fairPrice: { lower: Decimal; upper: Decimal }; + floorPrice: Decimal; + claimBondFee: Decimal; + alphaAccrualFactor: Decimal; + marketPricePremium: Decimal; + hasMarketPremium: boolean; + simulatedMarketPrice: Decimal; + breakEvenAccrualFactor: Decimal; + rebondAccrualFactor: Decimal; + breakEvenPeriodInDays: Decimal; + rebondPeriodInDays: Decimal; + yieldAmplification?: Decimal; + bLusdApr?: Decimal; + bLusdLpApr?: Decimal; + controllerTargetAge: Decimal; + averageBondAge: Decimal; + floorPriceWithoutPendingHarvests: Decimal; + windDownPrice: Decimal; +}; + +export type TransactionStatus = "IDLE" | "PENDING" | "CONFIRMED" | "FAILED"; + +export type BondTransaction = + | "CREATE" + | "CANCEL" + | "CLAIM" + | "APPROVE_AMM" + | "APPROVE_SPENDER" + | "SWAP" + | "MANAGE_LIQUIDITY"; + +export type BondTransactionStatuses = Record; + +export type Maybe = T | undefined; + +export type BLusdLpRewards = Array<{ name: string; address: string; amount: Decimal }>; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/context/useBondContracts.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/context/useBondContracts.tsx new file mode 100644 index 0000000..db61b84 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/context/useBondContracts.tsx @@ -0,0 +1,223 @@ +import { Decimal } from "@liquity/lib-base"; +import { + BLUSDLPZap, + BLUSDLPZap__factory, + BLUSDToken, + BondNFT, + ChickenBondManager, + ERC20Faucet, + ERC20Faucet__factory +} from "@liquity/chicken-bonds/lusd/types"; +import { + CurveCryptoSwap2ETH, + CurveLiquidityGaugeV5__factory +} from "@liquity/chicken-bonds/lusd/types/external"; +import { CurveCryptoSwap2ETH__factory } from "@liquity/chicken-bonds/lusd/types/external"; +import { + BLUSDToken__factory, + BondNFT__factory, + ChickenBondManager__factory +} from "@liquity/chicken-bonds/lusd/types"; +import type { LUSDToken } from "@liquity/lib-ethers/dist/types"; +import LUSDTokenAbi from "@liquity/lib-ethers/abi/LUSDToken.json"; +import { useContract } from "../../../hooks/useContract"; +import { useLiquity } from "../../../hooks/LiquityContext"; +import { useCallback } from "react"; +import type { BondsApi } from "./api"; +import type { BLusdLpRewards, Bond, ProtocolInfo, Stats } from "./transitions"; +import { BLusdAmmTokenIndex } from "./transitions"; +import type { Addresses } from "./transitions"; +import { useWeb3React } from "@web3-react/core"; +import { useBondAddresses } from "./BondAddressesContext"; +import type { CurveLiquidityGaugeV5 } from "@liquity/chicken-bonds/lusd/types/external/CurveLiquidityGaugeV5"; + +type BondsInformation = { + protocolInfo: ProtocolInfo; + bonds: Bond[]; + stats: Stats; + bLusdBalance: Decimal; + lusdBalance: Decimal; + lpTokenBalance: Decimal; + stakedLpTokenBalance: Decimal; + lpTokenSupply: Decimal; + bLusdAmmBLusdBalance: Decimal; + bLusdAmmLusdBalance: Decimal; + lpRewards: BLusdLpRewards; +}; + +type BondContracts = { + addresses: Addresses; + lusdToken: LUSDToken | undefined; + bLusdToken: BLUSDToken | undefined; + bondNft: BondNFT | undefined; + chickenBondManager: ChickenBondManager | undefined; + bLusdAmm: CurveCryptoSwap2ETH | undefined; + bLusdAmmZapper: BLUSDLPZap | undefined; + bLusdGauge: CurveLiquidityGaugeV5 | undefined; + hasFoundContracts: boolean; + getLatestData: (account: string, api: BondsApi) => Promise; +}; + +export const useBondContracts = (): BondContracts => { + const { liquity } = useLiquity(); + const { chainId } = useWeb3React(); + const isMainnet = chainId === 1; + + const addresses = useBondAddresses(); + + const { + BLUSD_AMM_ADDRESS, + BLUSD_TOKEN_ADDRESS, + BOND_NFT_ADDRESS, + CHICKEN_BOND_MANAGER_ADDRESS, + LUSD_OVERRIDE_ADDRESS, + BLUSD_LP_ZAP_ADDRESS, + BLUSD_AMM_STAKING_ADDRESS + } = addresses; + + const [lusdTokenDefault, lusdTokenDefaultStatus] = useContract( + liquity.connection.addresses.lusdToken, + LUSDTokenAbi + ); + + const [lusdTokenOverride, lusdTokenOverrideStatus] = useContract( + LUSD_OVERRIDE_ADDRESS, + ERC20Faucet__factory.abi + ); + + const [lusdToken, lusdTokenStatus] = + LUSD_OVERRIDE_ADDRESS === null + ? [lusdTokenDefault, lusdTokenDefaultStatus] + : [(lusdTokenOverride as unknown) as LUSDToken, lusdTokenOverrideStatus]; + + const [bLusdToken, bLusdTokenStatus] = useContract( + BLUSD_TOKEN_ADDRESS, + BLUSDToken__factory.abi + ); + + const [bondNft, bondNftStatus] = useContract(BOND_NFT_ADDRESS, BondNFT__factory.abi); + const [chickenBondManager, chickenBondManagerStatus] = useContract( + CHICKEN_BOND_MANAGER_ADDRESS, + ChickenBondManager__factory.abi + ); + + const [bLusdAmm, bLusdAmmStatus] = useContract( + BLUSD_AMM_ADDRESS, + CurveCryptoSwap2ETH__factory.abi + ); + + const [bLusdAmmZapper, bLusAmmZapperStatus] = useContract( + BLUSD_LP_ZAP_ADDRESS, + BLUSDLPZap__factory.abi + ); + + const [bLusdGauge, bLusdGaugeStatus] = useContract( + BLUSD_AMM_STAKING_ADDRESS, + CurveLiquidityGaugeV5__factory.abi + ); + + const hasFoundContracts = + [ + lusdTokenStatus, + bondNftStatus, + chickenBondManagerStatus, + bLusdTokenStatus, + bLusdAmmStatus, + bLusAmmZapperStatus, + bLusdGaugeStatus + ].find(status => status === "FAILED") === undefined; + + const getLatestData = useCallback( + async (account: string, api: BondsApi): Promise => { + if ( + lusdToken === undefined || + bondNft === undefined || + chickenBondManager === undefined || + bLusdToken === undefined || + bLusdAmm === undefined || + bLusdGauge === undefined || + BLUSD_AMM_STAKING_ADDRESS === null + ) { + return undefined; + } + + const protocolInfoPromise = api.getProtocolInfo( + bLusdToken, + bLusdAmm, + chickenBondManager, + isMainnet + ); + + const bondsPromise = api.getAccountBonds( + account, + bondNft, + chickenBondManager, + await protocolInfoPromise + ); + + const [protocolInfo, stats, lpToken, lpStakingContract] = await Promise.all([ + protocolInfoPromise, + api.getStats(chickenBondManager), + api.getLpToken(bLusdAmm), + api.erc20From(BLUSD_AMM_STAKING_ADDRESS, bLusdAmm.provider) + ]); + + const [ + bLusdBalance, + lusdBalance, + lpTokenBalance, + stakedLpTokenBalance, + lpTokenSupply, + bLusdAmmCoinBalances, + lpRewards + ] = await Promise.all([ + api.getTokenBalance(account, bLusdToken), + api.getTokenBalance(account, lusdToken), + api.getTokenBalance(account, lpToken), + api.getTokenBalance(account, lpStakingContract), + api.getTokenTotalSupply(lpToken), + api.getCoinBalances(bLusdAmm), + api.getLpRewards(account, bLusdGauge) + ]); + + const bonds = await bondsPromise; + + return { + protocolInfo, + bonds, + stats, + bLusdBalance, + lusdBalance, + lpTokenBalance, + stakedLpTokenBalance, + lpTokenSupply, + bLusdAmmBLusdBalance: bLusdAmmCoinBalances[BLusdAmmTokenIndex.BLUSD], + bLusdAmmLusdBalance: bLusdAmmCoinBalances[BLusdAmmTokenIndex.LUSD], + lpRewards + }; + }, + [ + chickenBondManager, + bondNft, + bLusdToken, + lusdToken, + bLusdAmm, + isMainnet, + BLUSD_AMM_STAKING_ADDRESS, + bLusdGauge + ] + ); + + return { + addresses, + lusdToken, + bLusdToken, + bondNft, + chickenBondManager, + bLusdAmm, + bLusdAmmZapper, + bLusdGauge, + getLatestData, + hasFoundContracts + }; +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/lexicon.ts b/Templates/liquity-dev-frontend/src/components/Bonds/lexicon.ts new file mode 100644 index 0000000..50ba58b --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/lexicon.ts @@ -0,0 +1,252 @@ +import type { Lexicon } from "../../lexicon"; + +export const PENDING_BONDS: Lexicon = { + term: "Pending bonds", + description: "Your active bonds which are accruing bLUSD and can be claimed or cancelled." +}; + +export const BONDS: Lexicon = { + term: "Bonds", + description: "List of your pending bonds and bonds you have claimed or cancelled in the past." +}; + +export const NOT_BONDED_YET: Lexicon = { + term: "You don't have any pending bonds.", + description: + "You can bond LUSD to obtain Boosted LUSD (bLUSD) - a yield-amplified version of LUSD." +}; + +export const BONDS_NAVIGATION: Lexicon = { + term: "Bonds" +}; + +export const BOND_CREATED: Lexicon = { + term: "Bond created", + description: + "The date you created your bond. The bLUSD accrual starts at 0 and increases over time." +}; + +export const AVAILABLE_BONDS: Lexicon = { + term: "Available bonds", + description: "The types of bonds you can create." +}; + +export const BOND_ASSET: Lexicon = { + term: "Asset", + description: "The type of token accepted for bonding." +}; + +export const BOND_NFT: Lexicon = { + term: "NFT", + description: + "Bonds are represented as unique visual NFTs. The NFT image evolves when your bond is claimed or cancelled." +}; + +export const BREAK_EVEN_TIME: Lexicon = { + term: "Break-even time", + description: + "Estimated time at which the bond will have accrued enough bLUSD to offset the LUSD cost of the bond, under current market prices." +}; + +export const OPTIMUM_REBOND_TIME: Lexicon = { + term: "Rebond time", + description: + "Estimated optimum time to claim the bond, sell the bLUSD for LUSD, and then bond again, to maximize your return under current market prices." +}; + +export const REBOND_RETURN: Lexicon = { + term: `${OPTIMUM_REBOND_TIME.term} return`, + description: `Estimated return from selling your accrued bLUSD to LUSD at the ${OPTIMUM_REBOND_TIME.term}, minus the initial LUSD cost of the bond, under current market prices.` +}; + +export const REBOND_TIME_ROI: Lexicon = { + term: `${OPTIMUM_REBOND_TIME.term} ROI`, + description: `Estimated ROI of selling your accrued bLUSD to LUSD at the ${OPTIMUM_REBOND_TIME.term}, minus the initial LUSD cost of the bond, under current market prices.` +}; + +export const OPTIMUM_APY: Lexicon = { + term: "Max APR", + description: `Estimated APY of continuously bonding and claiming at the ${OPTIMUM_REBOND_TIME.term}, under current market prices. Rebonding at other times could lead to a lower APY.` +}; + +export const OPTIMUM_ACCRUAL: Lexicon = { + term: "Rebond accrual", + description: `The required amount of bLUSD to accrue for the ${OPTIMUM_REBOND_TIME.term}, under current market prices.`, + link: "https://docs.chickenbonds.org/faq/economic-design#_44lrt4qpho3a" +}; + +export const BOND_DEPOSIT: Lexicon = { + term: "Deposit", + description: + "The amount deposited into the bond, which can be fully recovered by cancelling the bond." +}; + +export const ACCRUED_AMOUNT: Lexicon = { + term: "Accruing", + description: "The amount of bLUSD this bond has accrued so far." +}; + +export const MARKET_VALUE: Lexicon = { + term: "Accrued value", + description: + "Current market value of the accrued bLUSD. The bLUSD market price can fluctuate but will always be higher than the floor price under rational market conditions." +}; + +export const BOND_AGE: Lexicon = { + term: "Age", + description: "Time elapsed since the creation of the bond." +}; + +export const BOND_RETURN: Lexicon = { + term: "Claim-now return", + description: + "Expected LUSD gained from claiming the bond now and selling the bLUSD for LUSD and deducting the initial cost of the bond, under current market prices.", + link: "https://docs.chickenbonds.org/faq/economic-design#_44lrt4qpho3a" +}; + +export const BOND_STATUS: Lexicon = { + term: "Status", + description: "One of three values: Pending, Cancelled, or Claimed." +}; + +export const PENDING_STATUS: Lexicon = { + term: "Pending", + description: "An active bond which is accruding bLUSD and can be cancelled or claimed." +}; + +export const CANCELLED_STATUS: Lexicon = { + term: "Cancelled", + description: "A bond which you cancelled." +}; + +export const CLAIMED_STATUS: Lexicon = { + term: "Claimed", + description: "A bond which you claimed." +}; + +export const CANCEL_BOND: Lexicon = { + term: "Cancel bond", + description: + "A bond can be cancelled at any time to recover the initially deposited LUSD amount while forgoing the accrued bLUSD.", + link: "https://docs.chickenbonds.org/faq/basic-usage#_rwpo6dhx26fq" +}; + +export const CLAIM_BOND: Lexicon = { + term: "Claim bond", + description: + "A bond can be claimed at any time to forgo the initially deposited LUSD amount and gain the accrued bLUSD.", + link: "https://docs.chickenbonds.org/faq/basic-usage#_2c022erjceom" +}; + +export const BLUSD_MARKET_PRICE: Lexicon = { + term: "Market price", + description: "The current price of bLUSD according to the bLUSD Curve pool." +}; + +export const BLUSD_FAIR_PRICE: Lexicon = { + term: "Fair price", + description: + "An estimated range of the market price of bLUSD based on the current yield amplification. The lower bound excludes the Pending bucket, the upper bound factors all buckets.", + link: "https://docs.chickenbonds.org/faq/economic-design#how-is-the-fair-price-calculated" +}; + +export const TOTAL_BONDS_STATISTIC: Lexicon = { + term: "Total bonds", + description: "The total number of bonds including: cancelled, claimed and pending." +}; + +export const PENDING_BONDS_STATISTIC: Lexicon = { + term: "Pending bonds", + description: + "The current number of active bonds in the system which are not yet claimed or cancelled." +}; + +export const CANCELLED_BONDS_STATISTIC: Lexicon = { + term: "Cancelled bonds", + description: "The total number of bonds which were cancelled." +}; + +export const CLAIMED_BONDS_STATISTIC: Lexicon = { + term: "Claimed bonds", + description: "The total number of bonds which were claimed." +}; + +export const BLUSD_SUPPLY: Lexicon = { + term: "Total supply", + description: "The total amount of bLUSD in circulation. Not including pending bonds accrued bLUSD." +}; + +export const BLUSD_FLOOR_PRICE: Lexicon = { + term: "Floor price", + description: + "The amount of LUSD that an arbitrageur could redeem bLUSD for thus creating a lower bound bLUSD market price.", + link: "https://docs.chickenbonds.org/faq/economic-design#_c2c3valbf2bj-1" +}; + +export const BLUSD_WIND_DOWN_PRICE: Lexicon = { + term: "Net asset value", + description: + "The protocol supports a graceful wind down mechanism for migration purposes, whereby Yearn Finance governance can trigger a special function which moves the Permanent bucket LUSD into the Reserve, thus enabling all bLUSD to be redeemed for a higher floor price.", + link: + "https://docs.chickenbonds.org/faq/potential-future-system-migration#what-is-the-wind-down-functionality" +}; + +export const BLUSD_APR: Lexicon = { + term: "bLUSD APR", + description: "The APR of bLUSD, based on the yield generated from each bucket in the Treasury.", + link: "https://docs.chickenbonds.org/faq/economic-design#_c2c3valbf2bj" +}; + +export const BLUSD_LP_APR: Lexicon = { + term: "LP APR", + description: + "The APR from providing liquidity to the bLUSD/LUSD-3CRV pool. A combination of LUSD rewards from Chicken-in fees and Curve rewards.", + link: "https://docs.chickenbonds.org/faq/economic-design#_1qcmo1v5zahs" +}; + +export const BLUSD_YIELD_AMPLIFICATION: Lexicon = { + term: "Yield amplification", + description: + "The bLUSD token generates a yield which is a multiple of the Stability Pool yield. It is derived from the total protocol yield which is being diverted to the Reserve bucket.", + link: "https://docs.chickenbonds.org/faq/economic-design#yield-amplification" +}; + +export const TREASURY_TOTAL: Lexicon = { + term: "Total", + description: + "The total amount of LUSD held by the protocol within the three buckets (Pending, Reserve, Permanent).", + link: "https://docs.chickenbonds.org/faq/technical-design#_ydtvzh456fiz" +}; + +export const TREASURY_PENDING: Lexicon = { + term: "Pending", + description: + "Contains the deposited LUSD of the users while they bond. Pending bonds can be claimed or cancelled any time, moving the LUSD into the Reserve and Permanent buckets, or back to the bonder, respectively.", + link: "https://docs.chickenbonds.org/faq/technical-design#_ydtvzh456fiz" +}; + +export const TREASURY_ACQUIRED: Lexicon = { + term: "Reserve", + description: + "Contains a portion of the LUSD obtained from claimed bonds and captures the yield from the entire Treasury. It acts as a reserve backing the bLUSD supply. bLUSD can be redeemed for a pro-rata share of the LUSD held in the Reserve bucket.", + link: "https://docs.chickenbonds.org/faq/technical-design#_ydtvzh456fiz" +}; + +export const TREASURY_PERMANENT: Lexicon = { + term: "Permanent", + description: + "Contains a portion of the LUSD obtained from claimed bonds which contributes a permanent price premium over LUSD. The LUSD in this bucket is not redeemable.", + link: "https://docs.chickenbonds.org/faq/technical-design#_ydtvzh456fiz" +}; + +export const ESTIMATES_ONLY_NOTICE = { + description: "These metrics are estimations based on the current bLUSD market price", + link: "https://docs.chickenbonds.org/faq/economic-design#_lnta1xbq350e" +}; + +export const INFINITE_ESTIMATION = { + description: + "The bLUSD market price premium is currently too low to make bonding profitable. Bonds will be profitable again if the premium returns. Buying bLUSD from the market currently generates a higher return than bonding.", + link: + "https://docs.chickenbonds.org/faq/basic-usage#what-should-the-market-price-be-in-order-for-bonding-to-be-profitable" +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/utils.ts b/Templates/liquity-dev-frontend/src/components/Bonds/utils.ts new file mode 100644 index 0000000..52af2d3 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/utils.ts @@ -0,0 +1,192 @@ +import { Decimal } from "@liquity/lib-base"; +import { BigNumber } from "ethers"; +import { lambertW0 } from "lambert-w-function"; + +const milliseconds = (seconds: number) => seconds * 1000; + +const toFloat = (decimal: Decimal): number => parseFloat(decimal.toString()); + +const numberify = (bigNumber: BigNumber): number => bigNumber.toNumber(); + +const decimalify = (bigNumber: BigNumber): Decimal => + Decimal.fromBigNumberString(bigNumber.toHexString()); + +const percentify = (fraction: number): number => fraction * 100; + +const secondsToDays = (seconds: number): number => seconds / 60 / 60 / 24; + +const daysToMilliseconds = (days: number): number => days * 60 * 60 * 24 * 1000; + +const getBondAgeInDays = (startTime: number): number => + secondsToDays((Date.now() - startTime) / 1000); + +const dateWithoutHours = (timestamp: number) => new Date(new Date(timestamp).toDateString()); + +// Decimal type doesn't support negatives so use number instead +const getReturn = (accrued: Decimal, deposit: Decimal, marketPrice: Decimal): number => { + const accruedLusdValue = accrued.mul(marketPrice); + return parseFloat(accruedLusdValue.toString()) - parseFloat(deposit.toString()); +}; + +const dummyTokenUri = + "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NTAgMTA1MCI+PHN0eWxlPiNjYi1lZ2ctNTUgLmNiLWVnZyBwYXRoIHthbmltYXRpb246IHNoYWtlIDNzIGluZmluaXRlIGVhc2Utb3V0O3RyYW5zZm9ybS1vcmlnaW46IDUwJTt9QGtleWZyYW1lcyBzaGFrZSB7MCUgeyB0cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTsgfTY1JSB7IHRyYW5zZm9ybTogcm90YXRlKDBkZWcpOyB9NzAlIHsgdHJhbnNmb3JtOiByb3RhdGUoM2RlZyk7IH03NSUgeyB0cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTsgfTgwJSB7IHRyYW5zZm9ybTogcm90YXRlKC0zZGVnKTsgfTg1JSB7IHRyYW5zZm9ybTogcm90YXRlKDBkZWcpOyB9OTAlIHsgdHJhbnNmb3JtOiByb3RhdGUoM2RlZyk7IH0xMDAlIHsgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7IH19PC9zdHlsZT48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImNiLWVnZy01NS1jYXJkLWRpYWdvbmFsLWdyYWRpZW50IiB5MT0iMTAwJSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZDIwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2ZmMDA4NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJjYi1lZ2ctNTUiPjxyZWN0IGZpbGw9IiNjZDdmMzIiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHJ4PSIzNy41Ii8+PHJlY3Qgc3R5bGU9ImZpbGw6IHVybCgjY2ItZWdnLTU1LWNhcmQtZGlhZ29uYWwtZ3JhZGllbnQpIiB4PSIzMCIgeT0iMzAiIHdpZHRoPSI2OTAiIGhlaWdodD0iOTkwIiByeD0iMzcuNSIvPjxlbGxpcHNlIGZpbGw9IiMwYTEwMmUiIGN4PSIzNzUiIGN5PSI1NjAuMjUiIHJ4PSI2MCIgcnk9IjExLjQiIC8+PGcgY2xhc3M9ImNiLWVnZyI+PHBhdGggZmlsbD0iI2NkN2YzMiIgZD0iTTI5My44NiA0NzguMTJjMCA0NS4zNiAzNi40IDgyLjEzIDgxLjI5IDgyLjEzczgxLjI5LTM2Ljc3IDgxLjI5LTgyLjEzUzQyMC4wNSAzNjUuODUgMzc1LjE1IDM2NS44NUMzMzIuNzQgMzY1Ljg1IDI5My44NiA0MzIuNzYgMjkzLjg2IDQ3OC4xMloiLz48cGF0aCBzdHlsZT0ibWl4LWJsZW5kLW1vZGU6IHNvZnQtbGlnaHQiIGZpbGw9IiNmZmYiIGQ9Ik0zMjguOTYgNDA5LjRjLTYgMTMuNTktNS40OCAyOS41MyAzLjI1IDM2LjExIDkuNzYgNy4zNSAyMy44OSA5IDM2Ljk4LTMuMTMgMTIuNTctMTEuNjYgMjMuNDgtNDMuOTQgMS4yNC01NS41QzM1OC4yNSAzODAuNTUgMzM1LjU5IDM5NC4zNSAzMjguOTYgNDA5LjRaIi8+PHBhdGggc3R5bGU9Im1peC1ibGVuZC1tb2RlOiBzb2Z0LWxpZ2h0IiBmaWxsPSIjMDAwIiBkPSJNNDE2LjE3IDM4NS4wMmMxMS45NCAyMC45MiAxOS4xNSA0NS4zNSAxOS4xNCA2NS41MiAwIDQ1LjM2LTM2LjQgODIuMTMtODEuMyA4Mi4xM2E4MC40NSA4MC40NSAwIDAgMS01Mi41Mi0xOS40NUMzMTQuNTIgNTQxLjAzIDM0Mi41NCA1NjAuMjcgMzc1IDU2MC4yN2M0NC45IDAgODEuMy0zNi43NyA4MS4zLTgyLjEzQzQ1Ni4zMSA0NDcuOTUgNDQwLjE4IDQwOC4yMiA0MTYuMTcgMzg1LjAyWiIvPjwvZz48dGV4dCBmaWxsPSIjZmZmIiBmb250LWZhbWlseT0iQXJpYWwgQmxhY2ssIEFyaWFsIiBmb250LXNpemU9IjcycHgiIGZvbnQtd2VpZ2h0PSI4MDAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIHg9IjUwJSIgeT0iMTQlIj5MVVNEPC90ZXh0Pjx0ZXh0IGZpbGw9IiNmZmYiIGZvbnQtZmFtaWx5PSJBcmlhbCBCbGFjaywgQXJpYWwiIGZvbnQtc2l6ZT0iMzBweCIgZm9udC13ZWlnaHQ9IjgwMCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgeD0iNTAlIiB5PSIxOSUiPklEOiA1NTwvdGV4dD48dGV4dCBmaWxsPSIjZmZmIiBmb250LWZhbWlseT0iQXJpYWwgQmxhY2ssIEFyaWFsIiBmb250LXNpemU9IjQwcHgiIGZvbnQtd2VpZ2h0PSI4MDAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIHg9IjUwJSIgeT0iNzIlIj5CT05EIEFNT1VOVDwvdGV4dD48dGV4dCBmaWxsPSIjZmZmIiBmb250LWZhbWlseT0iQXJpYWwgQmxhY2ssIEFyaWFsIiBmb250LXNpemU9IjY0cHgiIGZvbnQtd2VpZ2h0PSI4MDAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIHg9IjUwJSIgeT0iODElIj40MDI8L3RleHQ+PHRleHQgZmlsbD0iI2ZmZiIgZm9udC1mYW1pbHk9IkFyaWFsIEJsYWNrLCBBcmlhbCIgZm9udC1zaXplPSIzMHB4IiBmb250LXdlaWdodD0iODAwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiB4PSI1MCUiIHk9IjkxJSIgb3BhY2l0eT0iMC42Ij5TRVBURU1CRVIgNywgMjAyMjwvdGV4dD48L2c+PC9zdmc+"; +const getTokenUri = (encodedTokenUri: string): string => { + // HACK: new goerli deployment has fixed data format issue, switch to it + const dataStartIndex = encodedTokenUri.indexOf("base64,") + "base64,".length; + + const hack = atob(encodedTokenUri.slice(dataStartIndex)) + .replace(`"background_color":`, `,"background_color":`) // Goerli fix + .replace(",,", ","); // Rinkeby fix + + const tokenUri = hack ? JSON.parse(hack)?.image : dummyTokenUri; // for localhost testing + return tokenUri; +}; + +const getBreakEvenPeriodInDays = ( + alphaAccrualFactor: Decimal, + marketPricePremium: Decimal, + claimBondFee: Decimal +): Decimal => { + const effectivePremium = marketPricePremium.mul(Decimal.ONE.sub(claimBondFee)); + if (effectivePremium.lte(Decimal.ONE)) return Decimal.INFINITY; + return alphaAccrualFactor.div(effectivePremium.sub(Decimal.ONE)); +}; + +const getFutureBLusdAccrualFactor = ( + floorPrice: Decimal, + daysInFuture: Decimal, + alphaAccrualFactor: Decimal, + bondAgeInDays = Decimal.ZERO +): Decimal => { + const duration = daysInFuture.sub(bondAgeInDays); + return Decimal.ONE.div(floorPrice).mul(duration.div(duration.add(alphaAccrualFactor))); +}; + +const getRebondPeriodInDays = ( + alphaAccrualFactor: Decimal, + marketPricePremium: Decimal, + claimBondFee: Decimal +): Decimal => { + const effectivePremium = Decimal.ONE.sub(claimBondFee).mul(marketPricePremium); + if (effectivePremium.lte(Decimal.ONE)) return Decimal.INFINITY; + const sqrt = Decimal.from(Math.sqrt(parseFloat(effectivePremium.toString()))); + const dividend = Decimal.ONE.add(sqrt); + const divisor = effectivePremium.sub(Decimal.ONE); + return alphaAccrualFactor.mul(dividend.div(divisor)); +}; + +const getFutureDateInDays = (days: number): Date => { + return new Date(Math.round(Date.now() + daysToMilliseconds(days))); +}; + +const getFloorPrice = ( + bammLusdDebt: Decimal, + totalLusdInCurve: Decimal, + pendingLusd: Decimal, + permanentLusd: Decimal, + bLusdSupply: Decimal +): Decimal => { + return bammLusdDebt.add(totalLusdInCurve).sub(pendingLusd).sub(permanentLusd).div(bLusdSupply); +}; + +const getAverageBondAgeInSeconds = ( + totalWeightedStartTimes: Decimal, + pendingBucketLusd: Decimal +): Decimal => { + const averageStartTimeMs = + Math.round(parseFloat(totalWeightedStartTimes.div(pendingBucketLusd).toString())) * 1000; + const averageBondAgeInSeconds = Decimal.from(Date.now() - averageStartTimeMs).div(1000); + + return averageBondAgeInSeconds; +}; + +const getDaysUntilControllerStartsAdjusting = ( + averageBondAgeInSeconds: Decimal, + targetBondAgeInSeconds: Decimal +): Decimal => { + const secondsUntil = targetBondAgeInSeconds.gt(averageBondAgeInSeconds) + ? targetBondAgeInSeconds.sub(averageBondAgeInSeconds) + : Decimal.ZERO; + const daysUntil = secondsToDays(parseFloat(secondsUntil.toString())); + return Decimal.from(daysUntil); +}; + +/* + Given the current rebond/break-even period, work out how many days + until the bond age will meet the reduced rebond/break-even period + + Formula: + bondAge + max((averageBondAge - targetBondAge), 0) + k = 0.99^k * rebondOrBreakEvenPeriod + (0.99 because the controller reduces alpha by 1% per day) + + Solved for k = + -(W(-(ln(0.99)x / 0.99^(bondAge + max((averageBondAge - targetBondAge), 0))) + ln(0.99) * (bondAge + max((averageBondAge - targetBondAge), 0))) / ln(0.99) + Where: + k = days until bond meets the reduced rebond/break-even period + W = lambert W function +*/ +const getRemainingRebondOrBreakEvenDays = ( + bondAgeInSeconds: Decimal, + targetBondAgeInSeconds: Decimal, + averageBondAgeInSeconds: Decimal, + rebondOrBreakEvenPeriodInDays: Decimal +): number => { + const bondAgeInDays = secondsToDays(toFloat(bondAgeInSeconds)); + const daysUntilControllerStartsAdjusting = toFloat( + getDaysUntilControllerStartsAdjusting(averageBondAgeInSeconds, targetBondAgeInSeconds) + ); + const rebondOrBreakEvenDaysRemaining = toFloat(rebondOrBreakEvenPeriodInDays) - bondAgeInDays; + + if (rebondOrBreakEvenDaysRemaining < daysUntilControllerStartsAdjusting) { + return rebondOrBreakEvenDaysRemaining; + } + + const lambertDividend = Math.log(0.99) * toFloat(rebondOrBreakEvenPeriodInDays); + const lambertDivisor = 0.99 ** (bondAgeInDays + daysUntilControllerStartsAdjusting); + const lambertQuotient = lambertW0(-(lambertDividend / lambertDivisor)); + + const formulaDividend = + lambertQuotient + Math.log(0.99) * (bondAgeInDays + daysUntilControllerStartsAdjusting); + + const formulaDivisor = Math.log(0.99); + + const daysUntilBondReachesRebondOrBreakEven = -(formulaDividend / formulaDivisor); + + return daysUntilBondReachesRebondOrBreakEven; +}; + +const getRebondOrBreakEvenTimeWithControllerAdjustment = ( + bondAgeInSeconds: Decimal, + targetBondAgeInSeconds: Decimal, + averageBondAgeInSeconds: Decimal, + rebondOrBreakEvenPeriodInDays: Decimal +): Date => { + const daysUntilBondReachesRebondOrBreakEven = getRemainingRebondOrBreakEvenDays( + bondAgeInSeconds, + targetBondAgeInSeconds, + averageBondAgeInSeconds, + rebondOrBreakEvenPeriodInDays + ); + + return getFutureDateInDays(daysUntilBondReachesRebondOrBreakEven); +}; + +export { + milliseconds, + toFloat, + numberify, + decimalify, + percentify, + getBondAgeInDays, + daysToMilliseconds, + dateWithoutHours, + getReturn, + getTokenUri, + getFutureBLusdAccrualFactor, + getBreakEvenPeriodInDays, + getRebondPeriodInDays, + getAverageBondAgeInSeconds, + getRemainingRebondOrBreakEvenDays, + getRebondOrBreakEvenTimeWithControllerAdjustment, + getFloorPrice +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/InfiniteEstimation.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/InfiniteEstimation.tsx new file mode 100644 index 0000000..e721f93 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/InfiniteEstimation.tsx @@ -0,0 +1,23 @@ +import { Decimal, Decimalish } from "@liquity/lib-base"; +import { InfoIcon } from "../../InfoIcon"; +import * as l from "../lexicon"; + +type InfiniteEstimateProps = { + estimate: Decimalish; +}; + +export const InfiniteEstimate: React.FC = ({ estimate, children }) => { + if (estimate.toString() !== Decimal.INFINITY.toString()) return <>{children ?? estimate}; + + return ( + <> + {Decimal.INFINITY.toString()} + +   + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/Actioning.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/Actioning.tsx new file mode 100644 index 0000000..8b94047 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/Actioning.tsx @@ -0,0 +1,157 @@ +/** @jsxImportSource theme-ui */ +import React from "react"; +import { Flex, Heading, Grid, Close, Box } from "theme-ui"; +import { Record } from "../../Record"; +import { useBondView } from "../../context/BondViewContext"; +import { HorizontalTimeline, Label, SubLabel } from "../../../HorizontalTimeline"; +import type { EventType } from "../../../HorizontalTimeline"; +import * as l from "../../lexicon"; +import { Cancel } from "./actions/cancel/Cancel"; +import { Claim } from "./actions/claim/Claim"; +import { Warning } from "../../../Warning"; +import { ReactModal } from "../../../ReactModal"; +import { percentify } from "../../utils"; +import { Decimal } from "@liquity/lib-base"; +import { InfiniteEstimate } from "../InfiniteEstimation"; + +export const Actioning: React.FC = () => { + const { dispatchEvent, view, selectedBond: bond } = useBondView(); + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + + if (bond === undefined) return null; + + let Actions; + switch (view) { + case "CANCELLING": { + Actions = ; + break; + } + case "CLAIMING": { + Actions = ; + break; + } + } + + const events: EventType[] = [ + { + date: new Date(bond.startTime), + label: ( + <> + + {`0 bLUSD`} + + ) + }, + { + date: new Date(bond.breakEvenTime), + label: ( + <> + + + + {bond.breakEvenAccrual.prettify(2)} bLUSD + + + + ) + }, + { + date: new Date(bond.rebondTime), + label: ( + <> + + + + {bond.rebondAccrual.prettify(2)} bLUSD + + + + ) + }, + { + date: new Date(Date.now()), + label: ( + <> + + {`${bond.accrued.prettify(2)} bLUSD`} + + ), + isEndOfLife: true, + isMilestone: false + } + ]; + + return ( + + + + {view === "CANCELLING" ? l.CANCEL_BOND.term : l.CLAIM_BOND.term} + + + + + + + + + + + + {view === "CLAIMING" && ( + + )} + +
+ Rebond estimations + + + + + + + +
+ + + {view === "CLAIMING" && bond.claimNowReturn < 0 && ( + You are claiming a bond which currently has a negative return + )} + {view === "CANCELLING" && bond.accrued.gte(bond.breakEvenAccrual) && ( + Your are cancelling a bond which has accrued a positive return + )} + + + {Actions} +
+ ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/cancel/Cancel.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/cancel/Cancel.tsx new file mode 100644 index 0000000..8272c16 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/cancel/Cancel.tsx @@ -0,0 +1,40 @@ +import React from "react"; +import { Flex, Button, Text, Spinner } from "theme-ui"; +import { ActionDescription } from "../../../../../ActionDescription"; +import { useBondView } from "../../../../context/BondViewContext"; + +export const Cancel: React.FC = () => { + const { dispatchEvent, selectedBond: bond, statuses } = useBondView(); + + const isProcessingTransaction = statuses.CANCEL === "PENDING"; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED"); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + if (bond === undefined) return null; + + return ( + <> + + You will receive your bonded{" "} + {bond.deposit.prettify(2)} LUSD back and forgo{" "} + {bond.accrued.shorten()} bLUSD + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/claim/Claim.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/claim/Claim.tsx new file mode 100644 index 0000000..1e2e5e3 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/actioning/actions/claim/Claim.tsx @@ -0,0 +1,40 @@ +import React from "react"; +import { Flex, Button, Text, Spinner } from "theme-ui"; +import { ActionDescription } from "../../../../../ActionDescription"; +import { useBondView } from "../../../../context/BondViewContext"; + +export const Claim: React.FC = () => { + const { dispatchEvent, selectedBond: bond, statuses } = useBondView(); + + const isProcessingTransaction = statuses.CLAIM === "PENDING"; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED"); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + if (bond === undefined) return null; + + return ( + <> + + You will receive {bond.accrued.prettify(2)} bLUSD{" "} + and forgo your bonded{" "} + {bond.deposit.prettify(2)} LUSD + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Creating.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Creating.tsx new file mode 100644 index 0000000..39cf6e6 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Creating.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { ModalWizard } from "../../../ModalWizard"; +import { ReactModal } from "../../../ReactModal"; +import { useBondView } from "../../context/BondViewContext"; +import { Information } from "./Information"; +import { Details } from "./Details"; + +export const Creating: React.FC = () => { + const { dispatchEvent } = useBondView(); + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + const ignoreInformation = window.localStorage.getItem("LIQUITY.BOND_FAQ.VISISBLE") === "true"; + + return !ignoreInformation ? ( + + +
+ + ) : ( + +
+ + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Details.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Details.tsx new file mode 100644 index 0000000..d344304 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Details.tsx @@ -0,0 +1,294 @@ +/** @jsxImportSource theme-ui */ +import React, { useEffect, useMemo, useState } from "react"; +import { Flex, Heading, Button, Card, Grid, Close, Image, Spinner } from "theme-ui"; +import { Decimal } from "@liquity/lib-base"; +import { EditableRow } from "../../../Trove/Editor"; +import { Record } from "../../Record"; +import { InfoIcon } from "../../../InfoIcon"; +import { useBondView } from "../../context/BondViewContext"; +import { HorizontalTimeline, Label, SubLabel, UNKNOWN_DATE } from "../../../HorizontalTimeline"; +import { EXAMPLE_NFT } from "../../context/BondViewProvider"; +import * as l from "../../lexicon"; +import { useWizard } from "../../../Wizard/Context"; +import { Warning } from "../../../Warning"; +import type { CreateBondPayload } from "../../context/transitions"; +import { + dateWithoutHours, + getReturn, + percentify, + toFloat, + getRemainingRebondOrBreakEvenDays, + getBreakEvenPeriodInDays, + getRebondPeriodInDays, + getRebondOrBreakEvenTimeWithControllerAdjustment +} from "../../utils"; +import { HorizontalSlider } from "../../../HorizontalSlider"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { Amount } from "../../../ActionDescription"; +import { InfiniteEstimate } from "../InfiniteEstimation"; +import { LearnMoreLink } from "../../../Tooltip"; + +type DetailsProps = { onBack?: () => void }; + +export const Details: React.FC = ({ onBack }) => { + const { + dispatchEvent, + statuses, + lusdBalance, + simulatedProtocolInfo, + setSimulatedMarketPrice, + resetSimulatedMarketPrice, + protocolInfo + } = useBondView(); + const { back } = useWizard(); + const [deposit, setDeposit] = useState(lusdBalance ?? Decimal.ZERO); + const depositEditingState = useState(); + const isConfirming = useMemo(() => statuses.CREATE === "PENDING", [statuses.CREATE]); + const handleBack = back ?? onBack ?? (() => dispatchEvent("BACK_PRESSED")); + const [isDepositEnough, setIsDepositEnough] = useState(lusdBalance?.gte(100) ?? true); + const [doesDepositExceedBalance, setDoesDepositExceedBalance] = useState(false); + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED", { deposit } as CreateBondPayload); + }; + + const handleDepositAmountChanged = (amount: Decimal) => { + const isDepositEnough = amount.gte(100); + const doesDepositExceedBalance = !!lusdBalance?.lt(amount); + setDeposit(amount); + setIsDepositEnough(isDepositEnough); + setDoesDepositExceedBalance(doesDepositExceedBalance); + }; + + useEffect(() => { + return () => resetSimulatedMarketPrice(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + if (protocolInfo === undefined || simulatedProtocolInfo === undefined || lusdBalance === undefined) + return null; + + const hasMarketPremium = simulatedProtocolInfo.hasMarketPremium; + const depositMinusClaimBondFee = Decimal.ONE.sub(protocolInfo.claimBondFee).mul(deposit); + const rebondReturn = getReturn( + depositMinusClaimBondFee.mul(simulatedProtocolInfo.rebondAccrualFactor), + deposit, + simulatedProtocolInfo.simulatedMarketPrice + ); + const rebondRoi = rebondReturn / toFloat(deposit) || 0; + const marketPriceMin = protocolInfo.floorPrice.mul(1.025).prettify(2); // Enough to display what happens below the 3% chicken in fee + const marketPriceMax = Decimal.max( + protocolInfo.marketPrice.mul(1.1), + protocolInfo.floorPrice.mul(1.5) + ).prettify(2); + + const rebondDays = getRebondPeriodInDays( + simulatedProtocolInfo.alphaAccrualFactor, + simulatedProtocolInfo.marketPricePremium, + protocolInfo.claimBondFee + ); + + const controllerAdjustedRebondDays = getRemainingRebondOrBreakEvenDays( + Decimal.ZERO, + simulatedProtocolInfo.controllerTargetAge, + simulatedProtocolInfo.averageBondAge, + rebondDays + ); + + const breakEvenDays = getBreakEvenPeriodInDays( + simulatedProtocolInfo.alphaAccrualFactor, + simulatedProtocolInfo.marketPricePremium, + protocolInfo.claimBondFee + ); + + const breakEvenTime = breakEvenDays.eq(Decimal.INFINITY) + ? UNKNOWN_DATE + : getRebondOrBreakEvenTimeWithControllerAdjustment( + Decimal.ZERO, + simulatedProtocolInfo.controllerTargetAge, + simulatedProtocolInfo.averageBondAge, + breakEvenDays + ); + + const rebondTime = rebondDays.eq(Decimal.INFINITY) + ? UNKNOWN_DATE + : getRebondOrBreakEvenTimeWithControllerAdjustment( + Decimal.ZERO, + simulatedProtocolInfo.controllerTargetAge, + simulatedProtocolInfo.averageBondAge, + rebondDays + ); + + const breakEvenAccrual = hasMarketPremium + ? depositMinusClaimBondFee.mul(simulatedProtocolInfo.breakEvenAccrualFactor) + : Decimal.INFINITY; + + const rebondAccrual = hasMarketPremium + ? depositMinusClaimBondFee.mul(simulatedProtocolInfo.rebondAccrualFactor) + : Decimal.INFINITY; + + return ( + <> + + Bond LUSD + + + + + + + {l.BOND_NFT.description} + + } + /> + + + + + + 0 bLUSD + + ), + isEndOfLife: true + }, + { + date: breakEvenTime, + label: ( + <> + + + + {breakEvenAccrual.prettify(2)} bLUSD + + + + ) + }, + { + date: rebondTime, + label: ( + <> + + + + {rebondAccrual.prettify(2)} bLUSD + + + + ) + } + ]} + /> + + + handleDepositAmountChanged(Decimal.from(amount))} + maxedOut={deposit.eq(lusdBalance)} + maxAmount={lusdBalance.toString()} + /> + + + + + + + + + + setSimulatedMarketPrice(value)} + onReset={() => resetSimulatedMarketPrice()} + /> + + {statuses.CREATE === "FAILED" && Failed to create bond. Please try again.} + + {!protocolInfo.hasMarketPremium && ( + + When the bLUSD market price is less than 3% above the floor price, it's not profitable to + bond. Buying bLUSD from the market currently generates a higher return than bonding.{" "} + + + )} + + {!isDepositEnough && The minimum bond amount is 100 LUSD.} + {doesDepositExceedBalance && ( + + Amount exceeds your balance by {deposit.sub(lusdBalance).prettify(2)} LUSD + + )} + + + You can cancel your bond at any time to recover your deposited LUSD + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Information.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Information.tsx new file mode 100644 index 0000000..a68a400 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/Information.tsx @@ -0,0 +1,91 @@ +/** @jsxImportSource theme-ui */ +import React, { useRef } from "react"; +import { + Box, + Button, + Checkbox, + Close, + Flex, + Heading, + Label, + Paragraph, + Link, + Image +} from "theme-ui"; +import { useWizard } from "../../../Wizard/Context"; +import { useBondView } from "../../context/BondViewContext"; +import { Details } from "./Details"; + +const InformationContainer: React.FC = ({ children }) => { + const { dispatchEvent } = useBondView(); + const handleDismiss = () => dispatchEvent("ABORT_PRESSED"); + + return ( + <> + + Bond LUSD + + + + + + + + {children} + + ); +}; + +export const Information: React.FC = () => { + const hideMessageRef = useRef(null); + + const { go, back } = useWizard(); + + const handleUnderstandPressed = () => { + if (hideMessageRef?.current?.checked) { + window.localStorage.setItem("LIQUITY.BOND_FAQ.VISISBLE", "true"); + } + go && go(Details); + }; + + return ( + + + + Bonds accrue a virtual balance of boosted LUSD tokens (bLUSD) over time. At any time, the + bonder may choose to claim their bLUSD in exchange for their LUSD, or cancel their bond to + recover their deposited LUSD. + + + Please visit the  + + docs + +  to understand how bonds work. + + + + + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/actions/Approve.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/actions/Approve.tsx new file mode 100644 index 0000000..fce2ae3 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/creating/actions/Approve.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import { Button } from "theme-ui"; +// import { useBondView } from "../../../context/BondViewContext"; + +type ApprovePropTypes = { + onApprove: Function; +}; + +export const Approve: React.FC = ({ onApprove }) => { + // const { dispatchEvent } = useBondView(); + + const handleApprove = () => { + // TXN logic effects etc. + // dispatchEvent("CANCEL_PRESSED"); + onApprove(); + }; + return ; +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Bond.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Bond.tsx new file mode 100644 index 0000000..4923ab6 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Bond.tsx @@ -0,0 +1,162 @@ +import { Card, Flex, Button, Image, ThemeUIStyleObject } from "theme-ui"; +import { EventType, HorizontalTimeline } from "../../../HorizontalTimeline"; +import { Record } from "../../Record"; +import { Actions } from "./actions/Actions"; +import { BLusdAmmTokenIndex, Bond as BondType, SwapPressedPayload } from "../../context/transitions"; +import { Label, SubLabel } from "../../../HorizontalTimeline"; +import * as l from "../../lexicon"; +import { statuses, useBondView } from "../../context/BondViewContext"; +import { useBondAddresses } from "../../context/BondAddressesContext"; +import { InfiniteEstimate } from "../InfiniteEstimation"; + +const getBondEvents = (bond: BondType): EventType[] => { + const events = [ + { + date: new Date(bond.startTime), + label: ( + <> + + {`0.00 bLUSD`} + + ) + }, + { + date: new Date(bond.status === "PENDING" ? Date.now() : bond?.endTime ?? 0), + label: ( + <> + + + {bond.status === "PENDING" + ? `${bond.accrued.prettify(2)} bLUSD` + : bond.status === "CLAIMED" + ? `${bond?.claimedAmount?.prettify(2)} bLUSD` + : ""} + + + ), + isEndOfLife: true, + isMilestone: bond.status !== "PENDING" + } + ]; + + if (bond.status === "PENDING") { + events.push({ + date: new Date(bond.breakEvenTime), + label: ( + <> + + + + {bond?.breakEvenAccrual?.prettify(2) ?? "?"} bLUSD + + + + ) + }); + + events.push({ + date: new Date(bond.rebondTime), + label: ( + <> + + + + {bond?.rebondAccrual?.prettify(2) ?? "?"} bLUSD + + + + ) + }); + } + return events; +}; + +type BondProps = { bond: BondType; style?: ThemeUIStyleObject }; + +export const Bond: React.FC = ({ bond, style }) => { + const events = getBondEvents(bond); + const { dispatchEvent } = useBondView(); + const { BOND_NFT_ADDRESS } = useBondAddresses(); + + const handleSellBLusdPressed = () => { + dispatchEvent("SWAP_PRESSED", { inputToken: BLusdAmmTokenIndex.BLUSD } as SwapPressedPayload); + }; + + return ( + + + NFT image representation of your bond. { + window.open( + `https://looksrare.org/collections/${BOND_NFT_ADDRESS}/${bond.id}`, + "_blank" + ); + }} + /> + + + + + + + + + {bond.status === "PENDING" && ( + + )} + + {bond.status === "PENDING" && } + {bond.status !== "PENDING" && bond.status === "CLAIMED" && ( + + )} + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/BondList.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/BondList.tsx new file mode 100644 index 0000000..9973ef7 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/BondList.tsx @@ -0,0 +1,41 @@ +import React from "react"; +import { Flex } from "theme-ui"; +import { Redirect, Route, Switch, useRouteMatch } from "react-router-dom"; +import { Link } from "../../../Link"; +import { FilteredBondList } from "./FilteredBondList"; +import { useBondView } from "../../context/BondViewContext"; + +export const BondList: React.FC = () => { + const { bonds } = useBondView(); + const { url, path } = useRouteMatch(); + + return ( + <> + {bonds && ( + + + All + + + Pending + + + Claimed + + + Cancelled + + + )} + + + + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Empty.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Empty.tsx new file mode 100644 index 0000000..029d459 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Empty.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { InfoMessage } from "../../../InfoMessage"; +import { NOT_BONDED_YET } from "../../lexicon"; + +export const Empty: React.FC = () => { + return {NOT_BONDED_YET.description}; +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/FilteredBondList.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/FilteredBondList.tsx new file mode 100644 index 0000000..5c4ada8 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/FilteredBondList.tsx @@ -0,0 +1,55 @@ +import { useParams } from "react-router-dom"; +import { useBondView } from "../../context/BondViewContext"; +import type { BondStatus, Bond as BondType } from "../../context/transitions"; +import { Bond } from "./Bond"; +import { OptimisticBond } from "./OptimisticBond"; +import { ActionDescription } from "../../../ActionDescription"; +import { Box } from "theme-ui"; + +type BondFilter = "pending" | "claimed" | "cancelled"; + +const bondFilterToBondStatusMap: Record = { + pending: "PENDING", + claimed: "CLAIMED", + cancelled: "CANCELLED" +}; + +const getFilteredBonds = (bonds: BondType[], bondFilter: BondFilter) => + bonds.filter(bond => bond.status === bondFilterToBondStatusMap[bondFilter]); + +type FilteredBondsParams = { bondFilter: BondFilter | "all" }; + +export const FilteredBondList = () => { + const { bonds, optimisticBond } = useBondView(); + const { bondFilter } = useParams(); + + if (bonds === undefined) return null; + + const isAllOrPending = bondFilter === "all" || bondFilter === "pending"; + const showOptimisticBond = optimisticBond !== undefined && isAllOrPending; + + const filteredBonds = bondFilter === "all" ? bonds : getFilteredBonds(bonds, bondFilter); + + return ( + <> + { + // @ts-ignore (TS doesn't realise optimisticBond can't be undefined here) + showOptimisticBond && + } + + {filteredBonds.map((bond: BondType, idx: number) => { + const isFirst = idx === 0 && !showOptimisticBond; + const style = { mt: isFirst ? "16px" : "32px" }; + return ; + })} + + {!showOptimisticBond && filteredBonds.length === 0 && ( + + + You don't have any {bondFilter !== "all" ? bondFilter : null} bonds + + + )} + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Idle.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Idle.tsx new file mode 100644 index 0000000..494b7b5 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/Idle.tsx @@ -0,0 +1,96 @@ +import React, { useEffect, useState } from "react"; +import { Card, Box, Heading, Flex, Button } from "theme-ui"; +import { Empty } from "./Empty"; +import { BondList } from "./BondList"; +import { useBondView } from "../../context/BondViewContext"; +import { BONDS } from "../../lexicon"; +import { InfoIcon } from "../../../InfoIcon"; +import { BLusdAmmTokenIndex, SwapPressedPayload } from "../../context/transitions"; +import { useLiquity } from "../../../../hooks/LiquityContext"; +import { useBondAddresses } from "../../context/BondAddressesContext"; + +export const Idle: React.FC = () => { + const { liquity } = useLiquity(); + const { LUSD_OVERRIDE_ADDRESS } = useBondAddresses(); + + const { dispatchEvent, bonds, getLusdFromFaucet, lusdBalance, hasLoaded } = useBondView(); + const [chain, setChain] = useState(); + + useEffect(() => { + (async () => { + if (liquity.connection.signer === undefined || chain !== undefined) return; + const chainId = await liquity.connection.signer.getChainId(); + setChain(chainId); + })(); + }, [chain, liquity.connection.signer]); + + if (!hasLoaded) return null; + + const hasBonds = bonds !== undefined && bonds.length > 0; + + const showLusdFaucet = LUSD_OVERRIDE_ADDRESS !== null && lusdBalance?.eq(0); + + const handleManageLiquidityPressed = () => dispatchEvent("MANAGE_LIQUIDITY_PRESSED"); + + const handleBuyBLusdPressed = () => + dispatchEvent("SWAP_PRESSED", { inputToken: BLusdAmmTokenIndex.LUSD } as SwapPressedPayload); + + const handleSellBLusdPressed = () => + dispatchEvent("SWAP_PRESSED", { inputToken: BLusdAmmTokenIndex.BLUSD } as SwapPressedPayload); + + return ( + <> + + + + + + + + {showLusdFaucet && ( + + )} + + {hasBonds && ( + + )} + + + {!hasBonds && ( + + + + {BONDS.term} + {BONDS.description}} + /> + + + + + + + + + + + )} + + {hasBonds && } + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/OptimisticBond.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/OptimisticBond.tsx new file mode 100644 index 0000000..17eefa0 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/OptimisticBond.tsx @@ -0,0 +1,107 @@ +import { Card, Flex, ThemeUIStyleObject } from "theme-ui"; +import { EventType, HorizontalTimeline, UNKNOWN_DATE } from "../../../HorizontalTimeline"; +import { Record } from "../../Record"; +import { Actions } from "./actions/Actions"; +import type { OptimisticBond as OptimisticBondType } from "../../context/transitions"; +import { Label, SubLabel } from "../../../HorizontalTimeline"; +import * as l from "../../lexicon"; +import { Placeholder } from "../../../Placeholder"; + +const getBondEvents = (bond: OptimisticBondType): EventType[] => { + return [ + { + date: new Date(bond.startTime), + label: ( + <> + + {`0.00 bLUSD`} + + ) + }, + { + date: new Date(Date.now()), + label: ( + <> + + + + ), + isEndOfLife: true + }, + { + date: UNKNOWN_DATE, + label: ( + <> + + + + ), + isLoading: true + }, + { + date: UNKNOWN_DATE, + label: ( + <> + + + + ), + isLoading: true + } + ]; +}; + +type BondProps = { bond: OptimisticBondType; style?: ThemeUIStyleObject }; + +export const OptimisticBond: React.FC = ({ bond, style }) => { + const events = getBondEvents(bond); + + return ( + + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/actions/Actions.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/actions/Actions.tsx new file mode 100644 index 0000000..7631d3e --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/idle/actions/Actions.tsx @@ -0,0 +1,69 @@ +import React from "react"; +import { Button } from "theme-ui"; +import Tippy from "@tippyjs/react"; +import { useBondView } from "../../../context/BondViewContext"; +import type { SelectBondPayload } from "../../../context/transitions"; +import { CANCEL_BOND, CLAIM_BOND } from "../../../lexicon"; + +const CHICKEN_EMOJI_CURSOR = `url("data:image/svg+xml;utf8, 🐔"), auto`; +type ActionsProps = { + bondId: string; + disabled?: boolean; +}; + +export const Actions: React.FC = ({ bondId, disabled = false }) => { + const { dispatchEvent, isBootstrapPeriodActive } = useBondView(); + + const handleCancelBondPressed = () => { + dispatchEvent("CANCEL_BOND_PRESSED", { bondId } as SelectBondPayload); + }; + + const handleClaimBondPressed = () => { + dispatchEvent("CLAIM_BOND_PRESSED", { bondId } as SelectBondPayload); + }; + + const cursor = disabled ? "auto" : CHICKEN_EMOJI_CURSOR; + + return ( + <> + + {isBootstrapPeriodActive && ( + + + + + + )} + {!isBootstrapPeriodActive && ( + + )} + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/DepositPane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/DepositPane.tsx new file mode 100644 index 0000000..acdbe01 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/DepositPane.tsx @@ -0,0 +1,249 @@ +import { Decimal } from "@liquity/lib-base"; +import React, { useEffect, useState } from "react"; +import { Flex, Button, Spinner, Checkbox, Label, Card, Text } from "theme-ui"; +import { Amount } from "../../../ActionDescription"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { Icon } from "../../../Icon"; +import { InfoIcon } from "../../../InfoIcon"; +import { DisabledEditableRow, EditableRow } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { BLusdAmmTokenIndex } from "../../context/transitions"; +import { PoolDetails } from "./PoolDetails"; +import type { Address, ApprovePressedPayload } from "../../context/transitions"; + +export const DepositPane: React.FC = () => { + const { + dispatchEvent, + statuses, + lusdBalance, + bLusdBalance, + isBLusdApprovedWithAmmZapper, + isLusdApprovedWithAmmZapper, + getExpectedLpTokens, + addresses, + bLusdAmmBLusdBalance, + bLusdAmmLusdBalance + } = useBondView(); + + const editingState = useState(); + const [bLusdAmount, setBLusdAmount] = useState(Decimal.ZERO); + const [lusdAmount, setLusdAmount] = useState(Decimal.ZERO); + const [lpTokens, setLpTokens] = useState(Decimal.ZERO); + const [shouldStakeInGauge, setShouldStakeInGauge] = useState(true); + const [shouldDepositBalanced, setShouldDepositBalanced] = useState(true); + + const coalescedBLusdBalance = bLusdBalance ?? Decimal.ZERO; + const coalescedLusdBalance = lusdBalance ?? Decimal.ZERO; + + const isApprovePending = statuses.APPROVE_SPENDER === "PENDING"; + const isManageLiquidityPending = statuses.MANAGE_LIQUIDITY === "PENDING"; + const isBLusdBalanceInsufficient = bLusdAmount.gt(coalescedBLusdBalance); + const isLusdBalanceInsufficient = lusdAmount.gt(coalescedLusdBalance); + const isAnyBalanceInsufficient = isBLusdBalanceInsufficient || isLusdBalanceInsufficient; + + const isDepositingLusd = lusdAmount.gt(0); + const isDepositingBLusd = bLusdAmount.gt(0); + + const zapperNeedsLusdApproval = isDepositingLusd && !isLusdApprovedWithAmmZapper; + const zapperNeedsBLusdApproval = isDepositingBLusd && !isBLusdApprovedWithAmmZapper; + const isApprovalNeeded = zapperNeedsLusdApproval || zapperNeedsBLusdApproval; + + const poolBalanceRatio = + bLusdAmmBLusdBalance && bLusdAmmLusdBalance + ? bLusdAmmLusdBalance.div(bLusdAmmBLusdBalance) + : Decimal.ONE; + + const handleApprovePressed = () => { + const tokensNeedingApproval = new Map(); + if (zapperNeedsLusdApproval) { + tokensNeedingApproval.set(BLusdAmmTokenIndex.LUSD, addresses.BLUSD_LP_ZAP_ADDRESS); + } + if (zapperNeedsBLusdApproval) { + tokensNeedingApproval.set(BLusdAmmTokenIndex.BLUSD, addresses.BLUSD_LP_ZAP_ADDRESS); + } + + dispatchEvent("APPROVE_PRESSED", { tokensNeedingApproval } as ApprovePressedPayload); + }; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED", { + action: "addLiquidity", + bLusdAmount, + lusdAmount, + minLpTokens: lpTokens, + shouldStakeInGauge + }); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + const handleToggleShouldStakeInGauge = () => { + setShouldStakeInGauge(toggle => !toggle); + }; + + const handleToggleShouldDepositBalanced = () => { + if (!shouldDepositBalanced) { + setBLusdAmount(Decimal.ZERO); + setLusdAmount(Decimal.ZERO); + } + setShouldDepositBalanced(toggle => !toggle); + }; + + const handleSetAmount = (token: "bLUSD" | "LUSD", amount: Decimal) => { + if (shouldDepositBalanced) { + if (token === "bLUSD") setLusdAmount(poolBalanceRatio.mul(amount)); + else if (token === "LUSD") setBLusdAmount(amount.div(poolBalanceRatio)); + } + + if (token === "bLUSD") setBLusdAmount(amount); + else if (token === "LUSD") setLusdAmount(amount); + }; + + useEffect(() => { + if (bLusdAmount.isZero && lusdAmount.isZero) { + setLpTokens(Decimal.ZERO); + return; + } + + let cancelled = false; + + const timeoutId = setTimeout(async () => { + try { + const expectedLpTokens = await getExpectedLpTokens(bLusdAmount, lusdAmount); + if (cancelled) return; + setLpTokens(expectedLpTokens); + } catch (error) { + console.error("getExpectedLpTokens() failed"); + console.log(error); + } + }, 200); + + return () => { + clearTimeout(timeoutId); + cancelled = true; + }; + }, [bLusdAmount, lusdAmount, getExpectedLpTokens]); + + return ( + <> + handleSetAmount("bLUSD", Decimal.from(amount))} + maxAmount={coalescedBLusdBalance.toString()} + maxedOut={bLusdAmount.eq(coalescedBLusdBalance)} + /> + + handleSetAmount("LUSD", Decimal.from(amount))} + maxAmount={coalescedLusdBalance.toString()} + maxedOut={lusdAmount.eq(coalescedLusdBalance)} + /> + + + + + + + + + + + + + + {isAnyBalanceInsufficient && ( + + Deposit exceeds your balance by{" "} + {isBLusdBalanceInsufficient && ( + <> + {bLusdAmount.sub(coalescedBLusdBalance).prettify(2)} bLUSD + {isLusdBalanceInsufficient && <> and } + + )} + {isLusdBalanceInsufficient && ( + {lusdAmount.sub(coalescedLusdBalance).prettify(2)} LUSD + )} + + )} + + + + + {!isApprovalNeeded ? ( + + ) : ( + + )} + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/ManagingLiquidity.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/ManagingLiquidity.tsx new file mode 100644 index 0000000..ec92d2a --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/ManagingLiquidity.tsx @@ -0,0 +1,74 @@ +import React, { useState } from "react"; +import { Close, Flex, Heading, NavLink, NavLinkProps } from "theme-ui"; +import { ReactModal } from "../../../ReactModal"; +import { useBondView } from "../../context/BondViewContext"; +import { DepositPane } from "./DepositPane"; +import { WithdrawPane } from "./WithdrawPane"; +import { StakePane } from "./StakePane"; +import { UnstakePane } from "./UnstakePane"; +import { RewardsPane } from "./RewardsPane"; + +interface LinkProps extends NavLinkProps { + active?: boolean; +} + +const Link: React.FC = ({ active, children, ...props }) => ( + + {children} + +); + +export const ManagingLiquidity: React.FC = () => { + const { dispatchEvent } = useBondView(); + const [selectedPane, setSelectedPane] = useState< + "deposit" | "withdraw" | "stake" | "unstake" | "claim" + >("deposit"); + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + + return ( + + + Manage liquidity + + + + + setSelectedPane("deposit")}> + Deposit + + + setSelectedPane("withdraw")}> + Withdraw + + + setSelectedPane("stake")}> + Stake + + + setSelectedPane("unstake")}> + Unstake + + + setSelectedPane("claim")}> + Rewards + + + + {selectedPane === "deposit" && } + {selectedPane === "withdraw" && } + {selectedPane === "stake" && } + {selectedPane === "unstake" && } + {selectedPane === "claim" && } + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PendingRewards.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PendingRewards.tsx new file mode 100644 index 0000000..c8b74a9 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PendingRewards.tsx @@ -0,0 +1,39 @@ +import { Box, Card, Flex } from "theme-ui"; +import { InfoIcon } from "../../../InfoIcon"; +import { StaticRow } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; + +export const PendingRewards: React.FC = () => { + const { lpRewards } = useBondView(); + + return ( + <> + + Rewards + + + + {lpRewards?.map(reward => { + return ( + + {reward.name} + Reward token address: {reward.address}} + /> + + } + /> + ); + })} + {(lpRewards === undefined || lpRewards?.length === 0) && ( + You have no pending rewards + )} + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolBalance.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolBalance.tsx new file mode 100644 index 0000000..3f4aabe --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolBalance.tsx @@ -0,0 +1,9 @@ +import { Text } from "theme-ui"; + +export const PoolBalance: React.FC<{ symbol: string }> = ({ symbol, children }) => ( + <> + {children} +   + {symbol} + +); diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolDetails.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolDetails.tsx new file mode 100644 index 0000000..afa4980 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/PoolDetails.tsx @@ -0,0 +1,73 @@ +import { Decimal } from "@liquity/lib-base"; +import { Text, Box, Flex } from "theme-ui"; +import { StaticRow, StaticAmounts } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { PoolBalance } from "./PoolBalance"; + +export const PoolDetails: React.FC = () => { + const { lpTokenSupply, bLusdAmmBLusdBalance, bLusdAmmLusdBalance, protocolInfo } = useBondView(); + const poolBalanceRatio = + bLusdAmmBLusdBalance && bLusdAmmLusdBalance + ? bLusdAmmLusdBalance.div(bLusdAmmBLusdBalance) + : Decimal.ONE; + + return ( +
+ + Pool details + + + + + + + {(bLusdAmmBLusdBalance ?? Decimal.ZERO).prettify(2)} + + + + + {(bLusdAmmLusdBalance ?? Decimal.ZERO).prettify(2)} + + + + + + + 1 + : + {poolBalanceRatio.prettify(2)} + + + + + + + + + + {(protocolInfo?.marketPrice ?? Decimal.INFINITY).prettify(2)} + {" "} + + + + + + + {(protocolInfo?.bLusdLpApr ?? Decimal.INFINITY).prettify(2)} + {" "} + + + + +
+ ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/RewardsPane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/RewardsPane.tsx new file mode 100644 index 0000000..70070e6 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/RewardsPane.tsx @@ -0,0 +1,52 @@ +import { Decimal } from "@liquity/lib-base"; +import React from "react"; +import { Flex, Button, Spinner } from "theme-ui"; +import { StaticRow, StaticAmounts } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { PendingRewards } from "./PendingRewards"; +import { PoolBalance } from "./PoolBalance"; + +export const RewardsPane: React.FC = () => { + const { dispatchEvent, statuses, lpRewards, protocolInfo } = useBondView(); + + const isManageLiquidityPending = statuses.MANAGE_LIQUIDITY === "PENDING"; + const hasRewards = lpRewards?.find(reward => reward.amount.gt(0)) !== undefined; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED", { + action: "claimLpRewards" + }); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + return ( + <> + + + + + + {(protocolInfo?.bLusdLpApr ?? Decimal.INFINITY).prettify(2)} + {" "} + + + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/StakePane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/StakePane.tsx new file mode 100644 index 0000000..8a677f5 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/StakePane.tsx @@ -0,0 +1,119 @@ +import { Decimal } from "@liquity/lib-base"; +import React, { useState } from "react"; +import { Flex, Button, Spinner } from "theme-ui"; +import { Amount } from "../../../ActionDescription"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { EditableRow, StaticAmounts, StaticRow } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { ApprovePressedPayload, BLusdAmmTokenIndex } from "../../context/transitions"; +import { PoolBalance } from "./PoolBalance"; + +export const StakePane: React.FC = () => { + const { + dispatchEvent, + statuses, + lpTokenBalance, + isBLusdLpApprovedWithGauge, + addresses, + protocolInfo + } = useBondView(); + + const editingState = useState(); + const [stakeAmount, setStakeAmount] = useState(Decimal.ZERO); + + const isApprovePending = statuses.APPROVE_SPENDER === "PENDING"; + const coalescedLpTokenBalance = lpTokenBalance ?? Decimal.ZERO; + const isManageLiquidityPending = statuses.MANAGE_LIQUIDITY === "PENDING"; + const isBalanceInsufficient = stakeAmount.gt(coalescedLpTokenBalance); + + const handleApprovePressed = () => { + const tokensNeedingApproval = new Map(); + if (!isBLusdLpApprovedWithGauge) { + tokensNeedingApproval.set( + BLusdAmmTokenIndex.BLUSD_LUSD_LP, + addresses.BLUSD_AMM_STAKING_ADDRESS + ); + } + dispatchEvent("APPROVE_PRESSED", { + tokensNeedingApproval + } as ApprovePressedPayload); + }; + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED", { + action: "stakeLiquidity", + stakeAmount + }); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + return ( + <> + setStakeAmount(Decimal.from(amount))} + maxAmount={coalescedLpTokenBalance.toString()} + maxedOut={stakeAmount.eq(coalescedLpTokenBalance)} + /> + + + + + + {(protocolInfo?.bLusdLpApr ?? Decimal.INFINITY).prettify(2)} + {" "} + + + + + + Your LP tokens will be staked in the bLUSD Curve gauge to earn protocol fees and Curve + rewards. + + + {isBalanceInsufficient && ( + + LP Token amount exceeds your balance by{" "} + {stakeAmount.sub(coalescedLpTokenBalance).prettify(2)} + + )} + + + + + {!isBLusdLpApprovedWithGauge && ( + + )} + + {isBLusdLpApprovedWithGauge && ( + + )} + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/UnstakePane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/UnstakePane.tsx new file mode 100644 index 0000000..6e46238 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/UnstakePane.tsx @@ -0,0 +1,82 @@ +import { Decimal } from "@liquity/lib-base"; +import React, { useState } from "react"; +import { Flex, Button, Spinner } from "theme-ui"; +import { Amount } from "../../../ActionDescription"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { EditableRow, StaticAmounts, StaticRow } from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { PendingRewards } from "./PendingRewards"; +import { PoolBalance } from "./PoolBalance"; + +export const UnstakePane: React.FC = () => { + const { dispatchEvent, statuses, stakedLpTokenBalance, protocolInfo } = useBondView(); + + const editingState = useState(); + const [unstakeAmount, setUnstakeAmount] = useState(Decimal.ZERO); + + const coalescedStakedLpTokenBalance = stakedLpTokenBalance ?? Decimal.ZERO; + const isManageLiquidityPending = statuses.MANAGE_LIQUIDITY === "PENDING"; + const isBalanceInsufficient = unstakeAmount.gt(coalescedStakedLpTokenBalance); + + const handleConfirmPressed = () => { + dispatchEvent("CONFIRM_PRESSED", { + action: "unstakeLiquidity", + unstakeAmount + }); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + return ( + <> + setUnstakeAmount(Decimal.from(amount))} + maxAmount={coalescedStakedLpTokenBalance.toString()} + maxedOut={unstakeAmount.eq(coalescedStakedLpTokenBalance)} + /> + + + + + + + {(protocolInfo?.bLusdLpApr ?? Decimal.INFINITY).prettify(2)} + {" "} + + + + + Your staked LP tokens will be unstaked from the bLUSD Curve gauge and moved into your wallet. + Pending rewards will also be claimed and moved into your wallet. + + + {isBalanceInsufficient && ( + + LP Token amount exceeds your balance by{" "} + {unstakeAmount.sub(coalescedStakedLpTokenBalance).prettify(2)} + + )} + + + + + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/WithdrawPane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/WithdrawPane.tsx new file mode 100644 index 0000000..049e7ec --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/managing/WithdrawPane.tsx @@ -0,0 +1,236 @@ +import { Decimal } from "@liquity/lib-base"; +import React, { useEffect, useState } from "react"; +import { Flex, Button, Spinner, Label, Radio, Text } from "theme-ui"; +import { Amount } from "../../../ActionDescription"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { Icon } from "../../../Icon"; +import { DisabledEditableAmounts, DisabledEditableRow, EditableRow } from "../../../Trove/Editor"; +import { Warning } from "../../../Warning"; +import { useBondView } from "../../context/BondViewContext"; +import { ApprovePressedPayload, BLusdAmmTokenIndex } from "../../context/transitions"; +import { PoolDetails } from "./PoolDetails"; + +const tokenSymbol = new Map([ + [BLusdAmmTokenIndex.BLUSD, "bLUSD"], + [BLusdAmmTokenIndex.LUSD, "LUSD"] +]); + +const WithdrawnAmount: React.FC<{ symbol: string }> = ({ symbol, children }) => ( + <> + {children} +   + {symbol} + +); + +const checkOutput = (value: string): BLusdAmmTokenIndex | "both" => { + if (value === "both") { + return "both"; + } + + const i = parseInt(value); + if (i === BLusdAmmTokenIndex.BLUSD || i === BLusdAmmTokenIndex.LUSD) { + return i; + } + + throw new Error(`invalid output choice "${value}"`); +}; + +const zeros = new Map([ + [BLusdAmmTokenIndex.BLUSD, Decimal.ZERO], + [BLusdAmmTokenIndex.LUSD, Decimal.ZERO] +]); + +export const WithdrawPane: React.FC = () => { + const DISABLE_WITHDRAWALS = true; + const { + dispatchEvent, + statuses, + lpTokenBalance, + getExpectedWithdrawal, + isBLusdLpApprovedWithAmmZapper, + stakedLpTokenBalance, + addresses + } = useBondView(); + + const editingState = useState(); + const [burnLpTokens, setBurnLp] = useState(Decimal.ZERO); + const [output, setOutput] = useState("both"); + const [withdrawal, setWithdrawal] = useState>(zeros); + + const isApprovePending = statuses.APPROVE_SPENDER === "PENDING"; + const coalescedLpTokenBalance = lpTokenBalance ?? Decimal.ZERO; + const isManageLiquidityPending = statuses.MANAGE_LIQUIDITY === "PENDING"; + const isBalanceInsufficient = burnLpTokens.gt(coalescedLpTokenBalance); + const needsApproval = output !== BLusdAmmTokenIndex.BLUSD && !isBLusdLpApprovedWithAmmZapper; + + const handleApprovePressed = () => { + const tokensNeedingApproval = new Map(); + if (needsApproval) { + tokensNeedingApproval.set(BLusdAmmTokenIndex.BLUSD_LUSD_LP, addresses.BLUSD_LP_ZAP_ADDRESS); + } + dispatchEvent("APPROVE_PRESSED", { tokensNeedingApproval } as ApprovePressedPayload); + }; + + const handleOutputChange = (e: React.ChangeEvent) => + setOutput(checkOutput(e.target.value)); + + const handleConfirmPressed = () => { + const curveSlippage = 0.001; // Allow mininum of %0.1% slippage due to Curve rounding issues + if (output === "both") { + const minBLusdAmount = withdrawal.get(BLusdAmmTokenIndex.BLUSD)?.mul(1 - curveSlippage); + const minLusdAmount = withdrawal.get(BLusdAmmTokenIndex.LUSD)?.mul(1 - curveSlippage); + + if (minBLusdAmount === undefined || minBLusdAmount === Decimal.ZERO) return; + if (minLusdAmount === undefined || minLusdAmount === Decimal.ZERO) return; + + dispatchEvent("CONFIRM_PRESSED", { + action: "removeLiquidity", + burnLpTokens, + minBLusdAmount, + minLusdAmount + }); + } else { + const minAmount = withdrawal.get(output)?.mul(1 - curveSlippage); + + if (minAmount === undefined || minAmount === Decimal.ZERO) return; + + dispatchEvent("CONFIRM_PRESSED", { + action: "removeLiquidityOneCoin", + burnLpTokens, + output, + minAmount + }); + } + } + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + useEffect(() => { + if (burnLpTokens.isZero) { + setWithdrawal(output === "both" ? zeros : new Map([[output, Decimal.ZERO]])); + return; + } + + let cancelled = false; + + const timeoutId = setTimeout(async () => { + try { + const expectedWithdrawal = await getExpectedWithdrawal(burnLpTokens, output); + if (cancelled) return; + setWithdrawal(expectedWithdrawal); + } catch (error) { + console.error("getExpectedWithdrawal() failed"); + console.log(error); + } + }, 200); + + return () => { + clearTimeout(timeoutId); + cancelled = true; + }; + }, [burnLpTokens, getExpectedWithdrawal, output]); + + return ( + <> + {stakedLpTokenBalance?.nonZero && ( + + You {lpTokenBalance?.nonZero && " also "} have {stakedLpTokenBalance.shorten()} staked LP + tokens. Unstake them to withdraw liquidity from them. + + )} + setBurnLp(Decimal.from(amount))} + maxAmount={coalescedLpTokenBalance.toString()} + maxedOut={burnLpTokens.eq(coalescedLpTokenBalance)} + /> + + + + + + + {Array.from(tokenSymbol.entries()).map(([key, symbol]) => ( + + ))} + + + + + + + {Array.from(withdrawal.entries()).map(([token, amount], i) => ( + + {i > 0 && +} + + {amount.prettify(2)} + + + ))} + + + + + + {isBalanceInsufficient && ( + + LP Token amount exceeds your balance by{" "} + {burnLpTokens.sub(coalescedLpTokenBalance).prettify(2)} + + )} + + + + + {needsApproval && ( + + )} + + {!needsApproval && ( + + )} + + + ); +};; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/SwapPane.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/SwapPane.tsx new file mode 100644 index 0000000..5e02f43 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/SwapPane.tsx @@ -0,0 +1,365 @@ +/** @jsxImportSource theme-ui */ + +import { Decimal, Percent } from "@liquity/lib-base"; +import React, { useEffect, useRef, useState } from "react"; +import { Flex, Button, Spinner, Heading, Close, Box, Label, Radio, Input, Link } from "theme-ui"; +import { Amount } from "../../../ActionDescription"; +import { ErrorDescription } from "../../../ErrorDescription"; +import { Icon } from "../../../Icon"; +import { Placeholder } from "../../../Placeholder"; +import { + DisabledEditableAmounts, + DisabledEditableRow, + EditableRow, + StaticAmounts, + StaticRow +} from "../../../Trove/Editor"; +import { useBondView } from "../../context/BondViewContext"; +import { BLusdAmmTokenIndex } from "../../context/transitions"; + +const tokenSymbol: Record = { + [BLusdAmmTokenIndex.BLUSD]: "bLUSD", + [BLusdAmmTokenIndex.LUSD]: "LUSD" +}; + +const outputToken: Record< + BLusdAmmTokenIndex.BLUSD | BLusdAmmTokenIndex.LUSD, + BLusdAmmTokenIndex.BLUSD | BLusdAmmTokenIndex.LUSD +> = { + [BLusdAmmTokenIndex.BLUSD]: BLusdAmmTokenIndex.LUSD, + [BLusdAmmTokenIndex.LUSD]: BLusdAmmTokenIndex.BLUSD +}; + +const marginalAmount = Decimal.ONE.div(1000); + +type SlippageTolerance = "half" | "one" | "custom"; + +const checkSlippageTolerance = (value: string): SlippageTolerance => { + if (value === "half" || value === "one" || value === "custom") { + return value; + } + + throw new Error(`invalid slippage tolerance choice "${value}"`); +}; + +export const SwapPane: React.FC = () => { + const { + dispatchEvent, + statuses, + inputToken, + lusdBalance, + bLusdBalance, + isInputTokenApprovedWithBLusdAmm, + bLusdAmmBLusdBalance, + bLusdAmmLusdBalance, + getExpectedSwapOutput + } = useBondView(); + const editingState = useState(); + const inputTokenBalance = + (inputToken === BLusdAmmTokenIndex.BLUSD ? bLusdBalance : lusdBalance) ?? Decimal.ZERO; + const [inputAmount, setInputAmount] = useState(Decimal.ZERO); + const [outputAmount, setOutputAmount] = useState(); + const [exchangeRate, setExchangeRate] = useState(); + const [priceImpact, setPriceImpact] = useState(); + const [slippageToleranceChoice, setSlippageToleranceChoice] = useState("half"); + const [customSlippageTolerance, setCustomSlippageTolerance] = useState(); + const [customSlippageToleranceFocus, setCustomSlippageToleranceFocus] = useState(false); + const customSlippageToleranceRef = useRef(null); + + const priceImpactPct = priceImpact && new Percent(priceImpact); + const isApprovePending = statuses.APPROVE_AMM === "PENDING"; + const isSwapPending = statuses.SWAP === "PENDING"; + const isBalanceInsufficient = inputAmount.gt(inputTokenBalance); + const isSlippageToleranceInvalid = + slippageToleranceChoice === "custom" && + (!customSlippageTolerance || + customSlippageTolerance.lt(0.001) || + customSlippageTolerance.gt(Decimal.ONE)); + const isSlippageToleranceHigh = customSlippageTolerance?.gt(0.05); + + // Used in dependency list of effect to recalculate output amount in case of pool changes + const poolState = `${bLusdAmmBLusdBalance},${bLusdAmmLusdBalance}`; + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + + const handleApprovePressed = () => { + dispatchEvent("APPROVE_PRESSED"); + }; + + const handleConfirmPressed = () => { + if (!outputAmount) { + return; + } + + const slippageTolerance = + slippageToleranceChoice === "half" + ? Decimal.from(0.005) + : slippageToleranceChoice === "one" + ? Decimal.from(0.01) + : customSlippageTolerance; + + if (!slippageTolerance || isSlippageToleranceInvalid) { + return; + } + + const minOutputFactor = Decimal.ONE.sub(slippageTolerance); + + dispatchEvent("CONFIRM_PRESSED", { + inputAmount, + minOutputAmount: outputAmount.mul(minOutputFactor) + }); + }; + + const handleBackPressed = () => { + dispatchEvent("BACK_PRESSED"); + }; + + const handleSlippageToleranceChange = (e: React.ChangeEvent) => + setSlippageToleranceChoice(checkSlippageTolerance(e.target.value)); + + useEffect(() => { + let cancelled = false; + + const timeoutId = setTimeout(async () => { + setOutputAmount(undefined); + setExchangeRate(undefined); + setPriceImpact(undefined); + + try { + const [marginalOutput, outputAmount] = await Promise.all([ + getExpectedSwapOutput(inputToken, marginalAmount), + inputAmount.nonZero && getExpectedSwapOutput(inputToken, inputAmount) + ]); + + if (cancelled) return; + + const marginalExchangeRate = marginalOutput.div(marginalAmount); + const exchangeRate = outputAmount?.div(inputAmount); + const priceImpact = exchangeRate?.lte(marginalExchangeRate) + ? marginalExchangeRate.sub(exchangeRate).div(marginalExchangeRate) + : Decimal.ZERO; + + setOutputAmount(outputAmount ?? Decimal.ZERO); + setExchangeRate(exchangeRate ?? marginalExchangeRate); + setPriceImpact(priceImpact); + } catch (error) { + console.error("getExpectedSwapOutput() failed"); + console.log(error); + } + }, 200); + + return () => { + clearTimeout(timeoutId); + cancelled = true; + }; + }, [inputToken, inputAmount, getExpectedSwapOutput, poolState]); + + return ( + <> + + + {inputToken === BLusdAmmTokenIndex.BLUSD ? <>Sell : <>Buy} bLUSD + + + + + setInputAmount(Decimal.from(amount))} + maxAmount={inputTokenBalance.toString()} + maxedOut={inputAmount.eq(inputTokenBalance)} + /> + + + + + + + {outputAmount ? ( + + ) : ( + + + + + + )} + + + + {exchangeRate ? ( + + ) : ( + + + + + + )} + + + + {priceImpact && priceImpactPct ? ( + + ) : ( + + + + + + )} + + +
+ Slippage tolerance + + + + + + + + +
+ + {isBalanceInsufficient && ( + + Amount exceeds your balance by{" "} + + {inputAmount.sub(inputTokenBalance).prettify(2)} {tokenSymbol[inputToken]} + + + )} + + {(bLusdAmmBLusdBalance?.isZero || bLusdAmmLusdBalance?.isZero) && ( + No liquidity in pool yet. Swap unavailable. + )} + + + Your swap is performed directly in  + + Curve + +  protocol. + + + + + + {isInputTokenApprovedWithBLusdAmm ? ( + + ) : ( + + )} + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/Swapping.tsx b/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/Swapping.tsx new file mode 100644 index 0000000..5bc58a7 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Bonds/views/swapping/Swapping.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import { ReactModal } from "../../../ReactModal"; +import { useBondView } from "../../context/BondViewContext"; +import { SwapPane } from "./SwapPane"; + +export const Swapping: React.FC = () => { + const { dispatchEvent } = useBondView(); + + const handleDismiss = () => { + dispatchEvent("ABORT_PRESSED"); + }; + + return ( + + + + ); +}; diff --git a/Templates/liquity-dev-frontend/src/components/CollateralSurplusAction.tsx b/Templates/liquity-dev-frontend/src/components/CollateralSurplusAction.tsx new file mode 100644 index 0000000..0f76c43 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/CollateralSurplusAction.tsx @@ -0,0 +1,51 @@ +import React, { useEffect } from "react"; +import { Button, Flex, Spinner } from "theme-ui"; + +import { LiquityStoreState } from "@liquity/lib-base"; +import { useLiquitySelector } from "@liquity/lib-react"; + +import { useLiquity } from "../hooks/LiquityContext"; + +import { Transaction, useMyTransactionState } from "./Transaction"; +import { useTroveView } from "./Trove/context/TroveViewContext"; + +const select = ({ collateralSurplusBalance }: LiquityStoreState) => ({ + collateralSurplusBalance +}); + +export const CollateralSurplusAction: React.FC = () => { + const { collateralSurplusBalance } = useLiquitySelector(select); + const { + liquity: { send: liquity } + } = useLiquity(); + + const myTransactionId = "claim-coll-surplus"; + const myTransactionState = useMyTransactionState(myTransactionId); + + const { dispatchEvent } = useTroveView(); + + useEffect(() => { + if (myTransactionState.type === "confirmedOneShot") { + dispatchEvent("TROVE_SURPLUS_COLLATERAL_CLAIMED"); + } + }, [myTransactionState.type, dispatchEvent]); + + return myTransactionState.type === "waitingForApproval" ? ( + + + + ) : myTransactionState.type !== "waitingForConfirmation" && + myTransactionState.type !== "confirmed" ? ( + + + + + + ) : null; +}; diff --git a/Templates/liquity-dev-frontend/src/components/ConnectionConfirmationDialog.tsx b/Templates/liquity-dev-frontend/src/components/ConnectionConfirmationDialog.tsx new file mode 100644 index 0000000..3b87f4c --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/ConnectionConfirmationDialog.tsx @@ -0,0 +1,32 @@ +import React from "react"; +import { Text, Box } from "theme-ui"; + +import { WaitingDialog } from "./WaitingDialog"; + +type ConnectionConfirmationDialogProps = { + title: string; + icon?: React.ReactNode; + onCancel: () => void; +}; + +export const ConnectionConfirmationDialog: React.FC = ({ + title, + icon, + onCancel, + children +}) => ( + + Waiting for connection confirmation... + This won’t cost you any Ether + + } + cancelLabel="Cancel connection" + onCancel={onCancel} + > + {children} + +); diff --git a/Templates/liquity-dev-frontend/src/components/Dialog.tsx b/Templates/liquity-dev-frontend/src/components/Dialog.tsx new file mode 100644 index 0000000..f1e0435 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Dialog.tsx @@ -0,0 +1,60 @@ +import React from "react"; +import { Heading, Flex, Card, Button, Box } from "theme-ui"; + +import { Icon } from "./Icon"; + +type DialogIntent = "success" | "warning" | "danger" | "info"; + +type DialogProps = { + intent?: DialogIntent; + title: string; + icon?: React.ReactNode; + cancelLabel?: string; + onCancel: () => void; +}; + +const iconFromIntent = (intent: DialogIntent | undefined) => { + switch (intent) { + case "success": + return ; + case "warning": + return ; + case "danger": + return ; + case "info": + return ; + } + return null; +}; + +export const Dialog: React.FC = ({ + intent, + title, + icon, + cancelLabel, + onCancel, + children +}) => ( + + {intent ? : null} + + {icon || iconFromIntent(intent)} + + {title} + + + + {children} + +); diff --git a/Templates/liquity-dev-frontend/src/components/ErrorDescription.tsx b/Templates/liquity-dev-frontend/src/components/ErrorDescription.tsx new file mode 100644 index 0000000..6ac3d19 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/ErrorDescription.tsx @@ -0,0 +1,27 @@ +import { Box, Flex, Text } from "theme-ui"; + +import { Icon } from "./Icon"; + +export const ErrorDescription: React.FC = ({ children }) => ( + + + + {children} + + +); diff --git a/Templates/liquity-dev-frontend/src/components/Header.tsx b/Templates/liquity-dev-frontend/src/components/Header.tsx new file mode 100644 index 0000000..512d9d0 --- /dev/null +++ b/Templates/liquity-dev-frontend/src/components/Header.tsx @@ -0,0 +1,49 @@ +import React from "react"; +import { LiquityStoreState } from "@liquity/lib-base"; +import { useLiquitySelector } from "@liquity/lib-react"; +import { Container, Flex, Box } from "theme-ui"; +import { AddressZero } from "@ethersproject/constants"; +import { useLiquity } from "../hooks/LiquityContext"; + +import { LiquityLogo } from "./LiquityLogo"; +import { Nav } from "./Nav"; +import { SideNav } from "./SideNav"; + +const logoHeight = "32px"; + +const select = ({ frontend }: LiquityStoreState) => ({ + frontend +}); + +export const Header: React.FC = ({ children }) => { + const { + config: { frontendTag } + } = useLiquity(); + const { frontend } = useLiquitySelector(select); + const isFrontendRegistered = frontendTag === AddressZero || frontend.status === "registered"; + + return ( + + + + + + {isFrontendRegistered && ( + <> + +