diff --git a/dist/chains.config.d.ts b/dist/chains.config.d.ts index 0b3fc16..450e523 100644 --- a/dist/chains.config.d.ts +++ b/dist/chains.config.d.ts @@ -1,2 +1,3 @@ import { Chain } from "viem"; +/** Reference for supported chains: https://github.com/gitcoinco/grants-stack/issues/3107 */ export declare const supportedChains: Chain[]; diff --git a/dist/chains.config.js b/dist/chains.config.js index 90d1a01..6867a63 100644 --- a/dist/chains.config.js +++ b/dist/chains.config.js @@ -2,6 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.supportedChains = void 0; const chains_1 = require("viem/chains"); +/** Local development chain support */ const devChain1 = { id: 1337, name: "Development 1", @@ -22,6 +23,7 @@ const devChain1 = { }, }, }; +/** Reference for supported chains: https://github.com/gitcoinco/grants-stack/issues/3107 */ exports.supportedChains = [ chains_1.mainnet, chains_1.optimism, diff --git a/dist/index.d.ts b/dist/index.d.ts index 81eac51..38471e4 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -4,6 +4,8 @@ import { MicroGrantsStrategy } from "./strategies/MicroGrantsStrategy/MicroGrant import { SQFSuperFluidStrategy } from "./strategies/SuperFluidStrategy/SQFSuperFluidStrategy"; import { DonationVotingMerkleDistributionStrategy } from "./strategies/DonationVotingMerkleDistributionStrategy/DonationVotingMerkleDistribution"; import { DirectGrantsStrategy } from "./strategies/DirectGrants/DirectGrantsStrategy"; +import { QVSimpleStrategy } from "./strategies/QVSimpleStrategy/QVSimpleStrategy"; +import { RFPSimpleStrategy } from "./strategies/RFPSimpleStrategy/RFPSimpleStrategy"; export * from "./types"; export * from "./strategies/types"; export * from "./Registry/types"; @@ -12,6 +14,8 @@ export * as DonationVotingMerkleDistributionStrategyTypes from "./strategies/Don export * as MicroGrantsStrategyTypes from "./strategies/MicroGrantsStrategy/types"; export * as SQFSuperFluidStrategyTypes from "./strategies/SuperFluidStrategy/types"; export * as DirectGrantsStrategyTypes from "./strategies/DirectGrants/types"; +export * as QVSimpleStrategyTypes from "./strategies/QVSimpleStrategy/types"; +export * as RFPSimpleStrategyTypes from "./strategies/RFPSimpleStrategy/types"; export { abi as AlloAbi } from "./Allo/allo.config"; export { abi as RegistryAbi } from "./Registry/registry.config"; export { abi as DonationVotingMerkleDistributionDirectTransferStrategyAbi } from "./strategies/DonationVotingMerkleDistributionStrategy/donationVotingDirect.config"; @@ -19,4 +23,6 @@ export { abi as DonationVotingMerkleDistributionVaultStrategyAbi } from "./strat export { abi as MicroGrantsStrategyAbi } from "./strategies/MicroGrantsStrategy/microGrants.config"; export { abi as SQFSuperFluidStrategyAbi } from "./strategies/SuperFluidStrategy/superfluid.config"; export { abi as DirectGrantsStrategyAbi } from "./strategies/DirectGrants/directGrants.config"; -export { Allo, Registry, MicroGrantsStrategy, SQFSuperFluidStrategy, DonationVotingMerkleDistributionStrategy, DirectGrantsStrategy, }; +export { abi as QVSimpleStrategyAbi } from "./strategies/QVSimpleStrategy/qvSimple.config"; +export { abi as RFPSimpleStrategyAbi } from "./strategies/RFPSimpleStrategy/rfpSimple.config"; +export { Allo, Registry, MicroGrantsStrategy, SQFSuperFluidStrategy, DonationVotingMerkleDistributionStrategy, DirectGrantsStrategy, QVSimpleStrategy, RFPSimpleStrategy, }; diff --git a/dist/index.js b/dist/index.js index dd7d445..ce8543a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DirectGrantsStrategy = exports.DonationVotingMerkleDistributionStrategy = exports.SQFSuperFluidStrategy = exports.MicroGrantsStrategy = exports.Registry = exports.Allo = exports.DirectGrantsStrategyAbi = exports.SQFSuperFluidStrategyAbi = exports.MicroGrantsStrategyAbi = exports.DonationVotingMerkleDistributionVaultStrategyAbi = exports.DonationVotingMerkleDistributionDirectTransferStrategyAbi = exports.RegistryAbi = exports.AlloAbi = exports.DirectGrantsStrategyTypes = exports.SQFSuperFluidStrategyTypes = exports.MicroGrantsStrategyTypes = exports.DonationVotingMerkleDistributionStrategyTypes = void 0; +exports.RFPSimpleStrategy = exports.QVSimpleStrategy = exports.DirectGrantsStrategy = exports.DonationVotingMerkleDistributionStrategy = exports.SQFSuperFluidStrategy = exports.MicroGrantsStrategy = exports.Registry = exports.Allo = exports.RFPSimpleStrategyAbi = exports.QVSimpleStrategyAbi = exports.DirectGrantsStrategyAbi = exports.SQFSuperFluidStrategyAbi = exports.MicroGrantsStrategyAbi = exports.DonationVotingMerkleDistributionVaultStrategyAbi = exports.DonationVotingMerkleDistributionDirectTransferStrategyAbi = exports.RegistryAbi = exports.AlloAbi = exports.RFPSimpleStrategyTypes = exports.QVSimpleStrategyTypes = exports.DirectGrantsStrategyTypes = exports.SQFSuperFluidStrategyTypes = exports.MicroGrantsStrategyTypes = exports.DonationVotingMerkleDistributionStrategyTypes = void 0; const Allo_1 = require("./Allo/Allo"); Object.defineProperty(exports, "Allo", { enumerable: true, get: function () { return Allo_1.Allo; } }); const Registry_1 = require("./Registry/Registry"); @@ -27,6 +27,10 @@ const DonationVotingMerkleDistribution_1 = require("./strategies/DonationVotingM Object.defineProperty(exports, "DonationVotingMerkleDistributionStrategy", { enumerable: true, get: function () { return DonationVotingMerkleDistribution_1.DonationVotingMerkleDistributionStrategy; } }); const DirectGrantsStrategy_1 = require("./strategies/DirectGrants/DirectGrantsStrategy"); Object.defineProperty(exports, "DirectGrantsStrategy", { enumerable: true, get: function () { return DirectGrantsStrategy_1.DirectGrantsStrategy; } }); +const QVSimpleStrategy_1 = require("./strategies/QVSimpleStrategy/QVSimpleStrategy"); +Object.defineProperty(exports, "QVSimpleStrategy", { enumerable: true, get: function () { return QVSimpleStrategy_1.QVSimpleStrategy; } }); +const RFPSimpleStrategy_1 = require("./strategies/RFPSimpleStrategy/RFPSimpleStrategy"); +Object.defineProperty(exports, "RFPSimpleStrategy", { enumerable: true, get: function () { return RFPSimpleStrategy_1.RFPSimpleStrategy; } }); __exportStar(require("./types"), exports); __exportStar(require("./strategies/types"), exports); __exportStar(require("./Registry/types"), exports); @@ -35,6 +39,8 @@ exports.DonationVotingMerkleDistributionStrategyTypes = require("./strategies/Do exports.MicroGrantsStrategyTypes = require("./strategies/MicroGrantsStrategy/types"); exports.SQFSuperFluidStrategyTypes = require("./strategies/SuperFluidStrategy/types"); exports.DirectGrantsStrategyTypes = require("./strategies/DirectGrants/types"); +exports.QVSimpleStrategyTypes = require("./strategies/QVSimpleStrategy/types"); +exports.RFPSimpleStrategyTypes = require("./strategies/RFPSimpleStrategy/types"); var allo_config_1 = require("./Allo/allo.config"); Object.defineProperty(exports, "AlloAbi", { enumerable: true, get: function () { return allo_config_1.abi; } }); var registry_config_1 = require("./Registry/registry.config"); @@ -49,3 +55,7 @@ var superfluid_config_1 = require("./strategies/SuperFluidStrategy/superfluid.co Object.defineProperty(exports, "SQFSuperFluidStrategyAbi", { enumerable: true, get: function () { return superfluid_config_1.abi; } }); var directGrants_config_1 = require("./strategies/DirectGrants/directGrants.config"); Object.defineProperty(exports, "DirectGrantsStrategyAbi", { enumerable: true, get: function () { return directGrants_config_1.abi; } }); +var qvSimple_config_1 = require("./strategies/QVSimpleStrategy/qvSimple.config"); +Object.defineProperty(exports, "QVSimpleStrategyAbi", { enumerable: true, get: function () { return qvSimple_config_1.abi; } }); +var rfpSimple_config_1 = require("./strategies/RFPSimpleStrategy/rfpSimple.config"); +Object.defineProperty(exports, "RFPSimpleStrategyAbi", { enumerable: true, get: function () { return rfpSimple_config_1.abi; } }); diff --git a/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.d.ts b/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.d.ts new file mode 100644 index 0000000..4d477c6 --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.d.ts @@ -0,0 +1,14 @@ +import { ConstructorArgs, DeployParams } from "../../types"; +import { InitializeParamsSimple } from "./types"; +export declare class QVSimpleStrategy { + private client; + private contract; + private strategy; + private poolId; + private allo; + constructor({ chain, rpc, address, poolId }: ConstructorArgs); + getInitializeData(params: InitializeParamsSimple): `0x${string}`; + getDeployParams(): DeployParams; + setPoolId(poolId: bigint): Promise; + setContract(address: `0x${string}`): void; +} diff --git a/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.js b/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.js new file mode 100644 index 0000000..895cd17 --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/QVSimpleStrategy.js @@ -0,0 +1,76 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.QVSimpleStrategy = void 0; +const viem_1 = require("viem"); +const Allo_1 = require("../../Allo/Allo"); +const chains_config_1 = require("../../chains.config"); +const Client_1 = require("../../Client/Client"); +const qvSimple_config_1 = require("./qvSimple.config"); +class QVSimpleStrategy { + constructor({ chain, rpc, address, poolId }) { + const usedChain = (0, viem_1.extractChain)({ + chains: chains_config_1.supportedChains, + id: chain, + }); + this.client = (0, Client_1.create)(usedChain, rpc); + this.allo = new Allo_1.Allo({ chain, rpc }); + if (address) { + this.contract = (0, viem_1.getContract)({ + address: address, + abi: [], + publicClient: this.client, + }); + this.strategy = address; + } + this.poolId = poolId || BigInt(-1); + } + getInitializeData(params) { + const encoded = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("uint256, (bool, bool, uint256, uint64, uint64, uint64, uint64)"), [ + params.maxVoiceCreditsPerAllocator, + [ + params.params.registryGating, + params.params.metadataRequired, + params.params.reviewThreshold, + params.params.registrationStartTime, + params.params.registrationEndTime, + params.params.allocationStartTime, + params.params.allocationEndTime, + ], + ]); + return encoded; + } + getDeployParams() { + const constructorArgs = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("address, string"), [this.allo.address(), "QVSimpleStrategy1.0"]); + const constructorArgsNo0x = constructorArgs.slice(2); + return { + abi: qvSimple_config_1.abi, + bytecode: (qvSimple_config_1.bytecode + + constructorArgsNo0x), + }; + } + setPoolId(poolId) { + return __awaiter(this, void 0, void 0, function* () { + this.poolId = poolId; + const strategyAddress = yield this.allo.getStrategy(poolId); + this.setContract(strategyAddress); + }); + } + setContract(address) { + this.contract = (0, viem_1.getContract)({ + address: address, + abi: qvSimple_config_1.abi, + publicClient: this.client, + }); + this.strategy = address; + } +} +exports.QVSimpleStrategy = QVSimpleStrategy; diff --git a/dist/strategies/QVSimpleStrategy/qvSimple.config.d.ts b/dist/strategies/QVSimpleStrategy/qvSimple.config.d.ts new file mode 100644 index 0000000..97ca1df --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/qvSimple.config.d.ts @@ -0,0 +1,98 @@ +export declare const abi: ({ + type: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + stateMutability: string; + name?: undefined; + outputs?: undefined; + anonymous?: undefined; +} | { + type: string; + stateMutability: string; + inputs?: undefined; + name?: undefined; + outputs?: undefined; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + outputs: { + name: string; + type: string; + internalType: string; + components: ({ + name: string; + type: string; + internalType: string; + components?: undefined; + } | { + name: string; + type: string; + internalType: string; + components: { + name: string; + type: string; + internalType: string; + }[]; + })[]; + }[]; + stateMutability: string; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + outputs: ({ + name: string; + type: string; + internalType: string; + components?: undefined; + } | { + name: string; + type: string; + internalType: string; + components: { + name: string; + type: string; + internalType: string; + }[]; + })[]; + stateMutability: string; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + indexed: boolean; + internalType: string; + }[]; + anonymous: boolean; + stateMutability?: undefined; + outputs?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + stateMutability?: undefined; + outputs?: undefined; + anonymous?: undefined; +})[]; +export declare const bytecode = "0x60c06040523480156200001157600080fd5b5060405162003358380380620033588339810160408190526200003491620000bf565b6001600160a01b03821660805260405182908290620000589082906020016200019a565b60408051601f19818403018152919052805160209091012060a0525050600160035550620001cf9050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b65781810151838201526020016200009c565b50506000910152565b60008060408385031215620000d357600080fd5b82516001600160a01b0381168114620000eb57600080fd5b60208401519092506001600160401b03808211156200010957600080fd5b818501915085601f8301126200011e57600080fd5b81518181111562000133576200013362000083565b604051601f8201601f19908116603f011681019083821181831017156200015e576200015e62000083565b816040528281528860208487010111156200017857600080fd5b6200018b83602083016020880162000099565b80955050505050509250929050565b6020815260008251806020840152620001bb81604085016020870162000099565b601f01601f19169190910160400192915050565b60805160a0516131396200021f60003960006102ce01526000818161020301528181610e6101528181610f30015281816115ba015281816116d701528181611d3a0152611f2a01526131396000f3fe6080604052600436106101c65760003560e01c806374b11d8a116100f7578063cb0e85a611610095578063eb11af9311610064578063eb11af9314610558578063edd146cc14610578578063ef2920fc14610598578063f5b0dfb7146105ab57600080fd5b8063cb0e85a6146104c5578063de1acc5c146104e4578063df868ed314610511578063e89e4ed61461052957600080fd5b8063b2b878d0116100d1578063b2b878d014610438578063b5f620ce14610465578063b9d7040b14610485578063caaed302146104a557600080fd5b806374b11d8a146103da5780639243b605146103f0578063a0cf0aea1461041057600080fd5b806343984ddb1161016457806351cff8d91161013e57806351cff8d91461034d5780635586ba331461036d578063570897391461039357806362812a39146103ad57600080fd5b806343984ddb146102f25780634ab4ba42146103085780634d31d0871461031d57600080fd5b80632bbe0cae116101a05780632bbe0cae1461026d578063369dc5b51461028057806338fff2d0146102a057806342fda9c7146102bf57600080fd5b80630a6f0ee9146101d257806315cc481e146101f45780632442e1cb1461024057600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed3660046124d9565b6105cb565b005b34801561020057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024c57600080fd5b5061026061025b366004612551565b6105eb565b6040516102379190612611565b61022361027b366004612653565b610711565b34801561028c57600080fd5b506101f261029b366004612551565b610736565b3480156102ac57600080fd5b506001545b604051908152602001610237565b3480156102cb57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102b1565b3480156102fe57600080fd5b506102b160075481565b34801561031457600080fd5b506002546102b1565b34801561032957600080fd5b5061033d6103383660046126a5565b61074d565b6040519015158152602001610237565b34801561035957600080fd5b506101f26103683660046126a5565b610758565b34801561037957600080fd5b50600454610223906201000090046001600160a01b031681565b34801561039f57600080fd5b5060045461033d9060ff1681565b3480156103b957600080fd5b506103cd6103c83660046126a5565b610783565b60405161023791906126c2565b3480156103e657600080fd5b506102b160065481565b3480156103fc57600080fd5b506101f261040b366004612719565b610794565b34801561041c57600080fd5b5061022373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561044457600080fd5b50610458610453366004612754565b610894565b6040516102379190612829565b34801561047157600080fd5b506101f261048036600461288f565b61092b565b34801561049157600080fd5b506101f26104a03660046128bb565b61093e565b3480156104b157600080fd5b506101f26104c0366004612551565b610b74565b3480156104d157600080fd5b5060045461033d90610100900460ff1681565b3480156104f057600080fd5b506105046104ff366004612551565b610c93565b6040516102379190612a0b565b34801561051d57600080fd5b5060005460ff1661033d565b34801561053557600080fd5b50610549610544366004612551565b610cc5565b60405161023793929190612a19565b34801561056457600080fd5b506105046105733660046126a5565b610da7565b34801561058457600080fd5b506101f2610593366004612a41565b610db2565b6101f26105a6366004612653565b610e12565b3480156105b757600080fd5b506101f26105c6366004612551565b610e2c565b6105d3610e56565b6105db610ea1565b6105e6838383610edd565b505050565b6105f36121ca565b6009828154811061060657610606612a88565b906000526020600020906004020160405180606001604052908160008201548152602001600182016040518060400160405290816000820154815260200160018201805461065390612a9e565b80601f016020809104026020016040519081016040528092919081815260200182805461067f90612a9e565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050919092525050508152600382015460209091019060ff1660068111156106f7576106f76125d9565b6006811115610708576107086125d9565b90525092915050565b600061071b610e56565b610723610ea1565b61072d8383611261565b90505b92915050565b3361074081611590565b61074982611642565b5050565b6000610730826116ba565b3361076281611590565b61076a61175f565b6000610776833061179c565b90506105e68333836117e5565b61078b612206565b6107308261181f565b6004546201000090046001600160a01b031633148015906107ce57506004546107cc906201000090046001600160a01b0316336119eb565b155b156107ec5760405163075fd2b160e01b815260040160405180910390fd5b6009546007541061081057604051632f1f68e160e11b815260040160405180910390fd5b600060096007548154811061082757610827612a88565b90600052602060002090600402019050818160010181816108489190612b26565b505060038101805460ff191660011790556007546040519081527fb8cc7b45ad9f94af049eb207914f37551e7d5c06a10c7fe73df91bbfc1643412906020015b60405180910390a15050565b60408051600180825281830190925260609160009190816020015b60408051808201909152600080825260208201528152602001906001900390816108af579050509050610906600460029054906101000a90046001600160a01b031660405180602001604052806000815250611b15565b8160008151811061091957610919612a88565b60209081029190910101529392505050565b3361093581611590565b61074982611c82565b3361094881611590565b600954156109d1576000600960008154811061096657610966612a88565b600091825260209091206003600490920201015460ff16600681111561098e5761098e6125d9565b146109c5576040517fb9463a6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109d16009600061224a565b8151600090815b81811015610b125760008582815181106109f4576109f4612a88565b602002602001015160000151905080600003610a2357604051632f1f68e160e11b815260040160405180910390fd5b610a2d8185612c35565b93506000868381518110610a4357610a43612a88565b6020026020010151604001906006811115610a6057610a606125d9565b90816006811115610a7357610a736125d9565b815250506009868381518110610a8b57610a8b612a88565b60209081029190910181015182546001818101855560009485529383902082516004909202019081558183015180519482019485559283015191939092916002840190610ad89082612c48565b505050604082015160038201805460ff19166001836006811115610afe57610afe6125d9565b021790555050600190920191506109d89050565b5081670de0b6b3a764000014610b3b57604051632f1f68e160e11b815260040160405180910390fd5b6040518181527f5d89f885f30c3150c167b2c31128bdf9a126180d134fa1d434f7edceae2881189060200160405180910390a150505050565b33610b7e81611590565b600160098381548110610b9357610b93612a88565b600091825260209091206003600490920201015460ff166006811115610bbb57610bbb6125d9565b14610bf2576040517f0abee44c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360098381548110610c0757610c07612a88565b60009182526020909120600360049092020101805460ff19166001836006811115610c3457610c346125d9565b02179055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e7008260098481548110610c6e57610c6e612a88565b6000918252602090912060036004909202010154604051610888929160ff1690612d08565b600060098281548110610ca857610ca8612a88565b600091825260209091206003600490920201015460ff1692915050565b60098181548110610cd557600080fd5b90600052602060002090600402016000915090508060000154908060010160405180604001604052908160008201548152602001600182018054610d1890612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4490612a9e565b8015610d915780601f10610d6657610100808354040283529160200191610d91565b820191906000526020600020905b815481529060010190602001808311610d7457829003601f168201915b5050509190925250505060039091015460ff1683565b600061073082611cc3565b600081806020019051810190610dc89190612d1c565b9050610dd48382611cd8565b7f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a8383604051610e05929190612d67565b60405180910390a1505050565b610e1a610e56565b610e22610ea1565b6107498282611df0565b610e34610e56565b8060026000828254610e469190612c35565b90915550610e5390508181565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610e9f5760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003610e9f576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee561175f565b80610eef81611590565b60095460075410610f1357604051632f1f68e160e11b815260040160405180910390fd5b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91610f679160040190815260200190565b600060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fac9190810190612e22565b90506000600960075481548110610fc557610fc5612a88565b60009182526020808320600480546201000090046001600160a01b039081168652600a84526040808720815160a081018352815460ff8082161515835261010090910490941696810196909652600181015491860191909152600281015495909202909201955091926060840191166006811115611045576110456125d9565b6006811115611056576110566125d9565b8152602001600382016040518060400160405290816000820154815260200160018201805461108490612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546110b090612a9e565b80156110fd5780601f106110d2576101008083540402835291602001916110fd565b820191906000526020600020905b8154815290600101906020018083116110e057829003601f168201915b5050509190925250505090525090506001600383015460ff166006811115611127576111276125d9565b1461114557604051632f1f68e160e11b815260040160405180910390fd5b6000670de0b6b3a7640000836000015483604001516111649190612ed6565b61116e9190612eed565b905080600260008282546111829190612f0f565b9250508190555061119c84604001518360200151836117e5565b60038301805460ff19166002179055600780549060006111bb83612f22565b91905055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e70060075460026040516111f4929190612d08565b60405180910390a1600454602083810151604080516001600160a01b03928316815292830185905289821683820152516201000090930416917fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9181900360600190a25050505050505050565b600061126b612013565b60008060008061128e604051806040016040528060008152602001606081525090565b878060200190518101906112a29190612f3b565b600454929750929550935090915060ff16806112c657506001600160a01b03831615155b9450846112d357866112d5565b825b95508480156112eb57506112e986886119eb565b155b156113095760405163075fd2b160e01b815260040160405180910390fd5b600454610100900460ff16801561132c5750602081015151158061132c57508051155b15611363576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065482111561139f576040517faf55723000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036113ad5760065491505b6001600160a01b0384166113e45760405163f4a513b960e01b81526001600160a01b03871660048201526024015b60405180910390fd5b6001600160a01b0386166000908152600a6020526040812090600282015460ff166006811115611416576114166125d9565b036114b557600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0389169081179091556040517fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906114a8908c908c90612fa9565b60405180910390a26114f9565b866001600160a01b03167faf5977db3aa7e6fc7d05e21c791ebd214afa76da27c8d8ddc8e4a9f742d7b2368a8a6040516114f0929190612fa9565b60405180910390a25b80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038716021781558561153d57805460ff16611540565b60015b815460ff191690151517815560018101839055815160038201908155602083015183919060048401906115739082612c48565b505050600201805460ff1916600117905550939695505050505050565b6001546040516329e40d4b60e01b815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116259190612fd4565b610e535760405163075fd2b160e01b815260040160405180910390fd5b60065481101561167e576040517ff96c278800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60068190556040518181527fbe1bfc6b02716ac59d6f9a0b32d161252bb03558ca6b238dbc66752cef8d2bb6906020015b60405180910390a150565b6001546040516329e40d4b60e01b81526000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916329e40d4b9161171e9186906004019182526001600160a01b0316602082015260400190565b602060405180830381865afa15801561173b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107309190612fd4565b60005460ff1615610e9f576040517fb186267000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016117d457506001600160a01b03811631610730565b6117de838361204f565b9050610730565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611814576105e68282612084565b6105e68383836120a0565b611827612206565b6001600160a01b038083166000908152600a6020908152604091829020825160a081018452815460ff8082161515835261010090910490951692810192909252600181015492820192909252600282015490926060840191166006811115611891576118916125d9565b60068111156118a2576118a26125d9565b815260200160038201604051806040016040529081600082015481526020016001820180546118d090612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546118fc90612a9e565b80156119495780601f1061191e57610100808354040283529160200191611949565b820191906000526020600020905b81548152906001019060200180831161192c57829003601f168201915b505050919092525050509052506004549091506201000090046001600160a01b03161580159061198d57506004546001600160a01b03838116620100009092041614155b156119e6576000816060015160068111156119aa576119aa6125d9565b116119b65760006119b9565b60035b816060019060068111156119cf576119cf6125d9565b908160068111156119e2576119e26125d9565b9052505b919050565b6005546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839291169063dd93da4390602401600060405180830381865afa158015611a52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a7a9190810190612ff1565b60055481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350911690635e8a791590604401602060405180830381865afa158015611ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0d9190612fd4565b949350505050565b604080518082018252600080825260208083018290526001600160a01b038681168352600a8252848320855160a081018752815460ff80821615158352610100909104909316938101939093526001810154958301959095526002850154939492939192916060840191166006811115611b9157611b916125d9565b6006811115611ba257611ba26125d9565b81526020016003820160405180604001604052908160008201548152602001600182018054611bd090612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054611bfc90612a9e565b8015611c495780601f10611c1e57610100808354040283529160200191611c49565b820191906000526020600020905b815481529060010190602001808311611c2c57829003601f168201915b505050919092525050509052506040805180820182526020808401516001600160a01b0316825291909201519082015291505092915050565b6000805460ff19168215159081179091556040519081527fd94c9bc4d43c51d8dc345a016d8e3d994432fac68e72832e4cf3a616bd8efae0906020016116af565b6000611cce8261181f565b6060015192915050565b611ce1826120ef565b6020818101516004805460408086015161ffff1990921693151561ff001916939093176101009115159190910217815581517f5ab1bd5300000000000000000000000000000000000000000000000000000000815291517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693635ab1bd539380840193919291908290030181865afa158015611d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dae91906130b8565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790558051611de690611642565b6107496001611c82565b611df8612157565b611e00612013565b80611e0a81611590565b600083806020019051810190611e2091906130d5565b600480547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b039485168102919091179182905590049091166000818152600a602052604090209192501580611e9a57506001600282015460ff166006811115611e9757611e976125d9565b14155b15611ecf576004805460405163f4a513b960e01b8152620100009091046001600160a01b0316918101919091526024016113db565b6002818101805460ff1916909117905560018101548214611f0357604051637fcce2a960e01b815260040160405180910390fd5b611f0d6000611c82565b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91611f619160040190815260200190565b600060405180830381865afa158015611f7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fa69190810190612e22565b60045460408281015181518781526001600160a01b03918216602082015289821681840152915193945062010000909204909116917f463ffc2cf8b1596445c417388ed30e53eb67cf6668cb2be7f0addf8a78c8441b9181900360600190a2505050506107496001600355565b60005460ff16610e9f576040517fcfe7975b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16107495763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166120e5576390b8ec186000526004601cfd5b6000603452505050565b6120f7610e56565b60015415612131576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000361215257604051637fcce2a960e01b815260040160405180910390fd5b600155565b6002600354036121c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016113db565b6002600355565b6040518060600160405280600081526020016121f9604051806040016040528060008152602001606081525090565b815260200160005b905290565b6040805160a0810182526000808252602082018190529181018290529060608201908152602001612201604051806040016040528060008152602001606081525090565b5080546000825560040290600052602060002090810190610e5391905b808211156122a0576000808255600182018181558161228960028501826122a4565b50505060038101805460ff19169055600401612267565b5090565b5080546122b090612a9e565b6000825580601f106122c0575050565b601f016020900490600052602060002090810190610e5391905b808211156122a057600081556001016122da565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715612327576123276122ee565b60405290565b6040805190810167ffffffffffffffff81118282101715612327576123276122ee565b60405160c0810167ffffffffffffffff81118282101715612327576123276122ee565b604051601f8201601f1916810167ffffffffffffffff8111828210171561239c5761239c6122ee565b604052919050565b600067ffffffffffffffff8211156123be576123be6122ee565b5060051b60200190565b6001600160a01b0381168114610e5357600080fd5b600082601f8301126123ee57600080fd5b813560206124036123fe836123a4565b612373565b82815260059290921b8401810191818101908684111561242257600080fd5b8286015b84811015612446578035612439816123c8565b8352918301918301612426565b509695505050505050565b600067ffffffffffffffff82111561246b5761246b6122ee565b50601f01601f191660200190565b60006124876123fe84612451565b905082815283838301111561249b57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126124c357600080fd5b6124d283833560208501612479565b9392505050565b6000806000606084860312156124ee57600080fd5b833567ffffffffffffffff8082111561250657600080fd5b612512878388016123dd565b9450602086013591508082111561252857600080fd5b50612535868287016124b2565b9250506040840135612546816123c8565b809150509250925092565b60006020828403121561256357600080fd5b5035919050565b60005b8381101561258557818101518382015260200161256d565b50506000910152565b600081518084526125a681602086016020860161256a565b601f01601f19169290920160200192915050565b805182526000602082015160406020850152611b0d604085018261258e565b634e487b7160e01b600052602160045260246000fd5b6007811061260d57634e487b7160e01b600052602160045260246000fd5b9052565b6020815281516020820152600060208301516060604084015261263760808401826125ba565b9050604084015161264b60608501826125ef565b509392505050565b6000806040838503121561266657600080fd5b823567ffffffffffffffff81111561267d57600080fd5b612689858286016124b2565b925050602083013561269a816123c8565b809150509250929050565b6000602082840312156126b757600080fd5b81356124d2816123c8565b602081528151151560208201526001600160a01b036020830151166040820152604082015160608201526000606083015161270060808401826125ef565b50608083015160a080840152611b0d60c08401826125ba565b60006020828403121561272b57600080fd5b813567ffffffffffffffff81111561274257600080fd5b8201604081850312156124d257600080fd5b6000806040838503121561276757600080fd5b823567ffffffffffffffff8082111561277f57600080fd5b61278b868387016123dd565b93506020915081850135818111156127a257600080fd5b8501601f810187136127b357600080fd5b80356127c16123fe826123a4565b81815260059190911b820184019084810190898311156127e057600080fd5b8584015b83811015612818578035868111156127fc5760008081fd5b61280a8c89838901016124b2565b8452509186019186016127e4565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561287457815180516001600160a01b03168552860151868501529284019290850190600101612846565b5091979650505050505050565b8015158114610e5357600080fd5b6000602082840312156128a157600080fd5b81356124d281612881565b8035600781106119e657600080fd5b6000602082840312156128cd57600080fd5b67ffffffffffffffff80833511156128e457600080fd5b8235830184601f8201126128f757600080fd5b6129046123fe82356123a4565b81358082526020808301929160051b8401018781111561292357600080fd5b602084015b818110156129fe57858135111561293e57600080fd5b80358501601f196060828c038201121561295757600080fd5b61295f612304565b6020830135815260408301358981111561297857600080fd5b83016040818e038401121561298c57600080fd5b61299461232d565b92506020810135835260408101358a8111156129af57600080fd5b01603f81018d136129bf57600080fd5b6129d18d602083013560408401612479565b6020840152508160208201526129e9606084016128ac565b60408201528652505060209384019301612928565b5090979650505050505050565b6020810161073082846125ef565b838152606060208201526000612a3260608301856125ba565b9050611b0d60408301846125ef565b60008060408385031215612a5457600080fd5b82359150602083013567ffffffffffffffff811115612a7257600080fd5b612a7e858286016124b2565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612ab257607f821691505b602082108103612ad257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105e657600081815260208120601f850160051c81016020861015612aff5750805b601f850160051c820191505b81811015612b1e57828155600101612b0b565b505050505050565b813581556001808201602080850135601e19863603018112612b4757600080fd5b8501803567ffffffffffffffff811115612b6057600080fd5b8036038383011315612b7157600080fd5b612b8581612b7f8654612a9e565b86612ad8565b6000601f821160018114612bbb5760008315612ba357508382018501355b600019600385901b1c1916600184901b178655612c14565b600086815260209020601f19841690835b82811015612beb57868501880135825593870193908901908701612bcc565b5084821015612c0a5760001960f88660031b161c198785880101351681555b50508683881b0186555b505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561073057610730612c1f565b815167ffffffffffffffff811115612c6257612c626122ee565b612c7681612c708454612a9e565b84612ad8565b602080601f831160018114612cab5760008415612c935750858301515b600019600386901b1c1916600185901b178555612b1e565b600085815260208120601f198616915b82811015612cda57888601518255948401946001909101908401612cbb565b5085821015612cf85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b828152604081016124d260208301846125ef565b600060608284031215612d2e57600080fd5b612d36612304565b825181526020830151612d4881612881565b60208201526040830151612d5b81612881565b60408201529392505050565b828152604060208201526000611b0d604083018461258e565b80516119e6816123c8565b600082601f830112612d9c57600080fd5b8151612daa6123fe82612451565b818152846020838601011115612dbf57600080fd5b611b0d82602083016020870161256a565b600060408284031215612de257600080fd5b612dea61232d565b905081518152602082015167ffffffffffffffff811115612e0a57600080fd5b612e1684828501612d8b565b60208301525092915050565b600060208284031215612e3457600080fd5b815167ffffffffffffffff80821115612e4c57600080fd5b9083019060c08286031215612e6057600080fd5b612e68612350565b825181526020830151612e7a816123c8565b60208201526040830151612e8d816123c8565b6040820152606083015182811115612ea457600080fd5b612eb087828601612dd0565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b808202811582820484141761073057610730612c1f565b600082612f0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561073057610730612c1f565b600060018201612f3457612f34612c1f565b5060010190565b60008060008060808587031215612f5157600080fd5b8451612f5c816123c8565b6020860151909450612f6d816123c8565b60408601516060870151919450925067ffffffffffffffff811115612f9157600080fd5b612f9d87828801612dd0565b91505092959194509250565b604081526000612fbc604083018561258e565b90506001600160a01b03831660208301529392505050565b600060208284031215612fe657600080fd5b81516124d281612881565b60006020828403121561300357600080fd5b815167ffffffffffffffff8082111561301b57600080fd5b9083019060c0828603121561302f57600080fd5b613037612350565b825181526020830151602082015260408301518281111561305757600080fd5b61306387828601612d8b565b60408301525060608301518281111561307b57600080fd5b61308787828601612dd0565b60608301525061309960808401612d80565b60808201526130aa60a08401612d80565b60a082015295945050505050565b6000602082840312156130ca57600080fd5b81516124d2816123c8565b600080604083850312156130e857600080fd5b82516130f3816123c8565b602093909301519294929350505056fea2646970667358221220cdc1dbd193b77181dcc1bad2e31acef1cadf1745f832a969464a85225890df9b64736f6c63430008130033"; diff --git a/dist/strategies/QVSimpleStrategy/qvSimple.config.js b/dist/strategies/QVSimpleStrategy/qvSimple.config.js new file mode 100644 index 0000000..b168443 --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/qvSimple.config.js @@ -0,0 +1,726 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bytecode = exports.abi = void 0; +exports.abi = [ + { + type: "constructor", + inputs: [ + { name: "_allo", type: "address", internalType: "address" }, + { name: "_name", type: "string", internalType: "string" }, + ], + stateMutability: "nonpayable", + }, + { type: "receive", stateMutability: "payable" }, + { + type: "function", + name: "NATIVE", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "addAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allocate", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "allocationEndTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocationStartTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocators", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [ + { name: "voiceCredits", type: "uint256", internalType: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "allowedAllocators", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "distribute", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "distributionStarted", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "getAllo", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IAllo" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPayouts", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes[]", internalType: "bytes[]" }, + ], + outputs: [ + { + name: "", + type: "tuple[]", + internalType: "struct IStrategy.PayoutSummary[]", + components: [ + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "amount", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolAmount", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolId", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipient", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct QVBaseStrategy.Recipient", + components: [ + { + name: "totalVotesReceived", + type: "uint256", + internalType: "uint256", + }, + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { name: "applicationId", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipientStatus", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getStrategyId", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + name: "increasePoolAmount", + inputs: [{ name: "_amount", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "initialize", + inputs: [ + { name: "_poolId", type: "uint256", internalType: "uint256" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isPoolActive", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isValidAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "maxVoiceCreditsPerAllocator", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "metadataRequired", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "multicall", + inputs: [{ name: "data", type: "bytes[]", internalType: "bytes[]" }], + outputs: [{ name: "results", type: "bytes[]", internalType: "bytes[]" }], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "paidOut", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "recipients", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [ + { name: "totalVotesReceived", type: "uint256", internalType: "uint256" }, + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { name: "recipientAddress", type: "address", internalType: "address" }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { name: "applicationId", type: "uint256", internalType: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "registerRecipient", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "recipientId", type: "address", internalType: "address" }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "registrationEndTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "registrationStartTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "registryGating", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "removeAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "reviewRecipients", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { + name: "_recipientStatuses", + type: "uint8[]", + internalType: "enum IStrategy.Status[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "reviewThreshold", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "reviewedByManager", + inputs: [ + { name: "", type: "address", internalType: "address" }, + { name: "", type: "uint256", internalType: "uint256" }, + { name: "", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "reviewsByStatus", + inputs: [ + { name: "", type: "address", internalType: "address" }, + { name: "", type: "uint256", internalType: "uint256" }, + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "totalRecipientVotes", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "updatePoolTimestamps", + inputs: [ + { + name: "_registrationStartTime", + type: "uint64", + internalType: "uint64", + }, + { name: "_registrationEndTime", type: "uint64", internalType: "uint64" }, + { name: "_allocationStartTime", type: "uint64", internalType: "uint64" }, + { name: "_allocationEndTime", type: "uint64", internalType: "uint64" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [{ name: "_token", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "votes", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "allocator", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "token", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllocatorAdded", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllocatorRemoved", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Distributed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "recipientAddress", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "poolId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + ], + anonymous: false, + }, + { + type: "event", + name: "PoolActive", + inputs: [ + { name: "active", type: "bool", indexed: false, internalType: "bool" }, + ], + anonymous: false, + }, + { + type: "event", + name: "RecipientStatusUpdated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Registered", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Reviewed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TimestampsUpdated", + inputs: [ + { + name: "registrationStartTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "registrationEndTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "allocationStartTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "allocationEndTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdatedRegistration", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + ], + anonymous: false, + }, + { type: "error", name: "ALLOCATION_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ENDED", inputs: [] }, + { type: "error", name: "ALREADY_INITIALIZED", inputs: [] }, + { type: "error", name: "AMOUNT_MISMATCH", inputs: [] }, + { type: "error", name: "ANCHOR_ERROR", inputs: [] }, + { type: "error", name: "ARRAY_MISMATCH", inputs: [] }, + { type: "error", name: "EXCESS_AMOUNT_SENT", inputs: [] }, + { type: "error", name: "INVALID", inputs: [] }, + { type: "error", name: "INVALID_ADDRESS", inputs: [] }, + { type: "error", name: "INVALID_FEE", inputs: [] }, + { type: "error", name: "INVALID_METADATA", inputs: [] }, + { type: "error", name: "INVALID_REGISTRATION", inputs: [] }, + { type: "error", name: "IS_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "MISMATCH", inputs: [] }, + { type: "error", name: "NONCE_NOT_AVAILABLE", inputs: [] }, + { type: "error", name: "NON_ZERO_VALUE", inputs: [] }, + { type: "error", name: "NOT_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "NOT_ENOUGH_FUNDS", inputs: [] }, + { type: "error", name: "NOT_IMPLEMENTED", inputs: [] }, + { type: "error", name: "NOT_INITIALIZED", inputs: [] }, + { type: "error", name: "NOT_PENDING_OWNER", inputs: [] }, + { type: "error", name: "POOL_ACTIVE", inputs: [] }, + { type: "error", name: "POOL_INACTIVE", inputs: [] }, + { type: "error", name: "RECIPIENT_ALREADY_ACCEPTED", inputs: [] }, + { + type: "error", + name: "RECIPIENT_ERROR", + inputs: [{ name: "recipientId", type: "address", internalType: "address" }], + }, + { type: "error", name: "RECIPIENT_NOT_ACCEPTED", inputs: [] }, + { type: "error", name: "REGISTRATION_ACTIVE", inputs: [] }, + { type: "error", name: "REGISTRATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "UNAUTHORIZED", inputs: [] }, + { type: "error", name: "ZERO_ADDRESS", inputs: [] }, +]; +exports.bytecode = "0x60c06040523480156200001157600080fd5b5060405162003358380380620033588339810160408190526200003491620000bf565b6001600160a01b03821660805260405182908290620000589082906020016200019a565b60408051601f19818403018152919052805160209091012060a0525050600160035550620001cf9050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b65781810151838201526020016200009c565b50506000910152565b60008060408385031215620000d357600080fd5b82516001600160a01b0381168114620000eb57600080fd5b60208401519092506001600160401b03808211156200010957600080fd5b818501915085601f8301126200011e57600080fd5b81518181111562000133576200013362000083565b604051601f8201601f19908116603f011681019083821181831017156200015e576200015e62000083565b816040528281528860208487010111156200017857600080fd5b6200018b83602083016020880162000099565b80955050505050509250929050565b6020815260008251806020840152620001bb81604085016020870162000099565b601f01601f19169190910160400192915050565b60805160a0516131396200021f60003960006102ce01526000818161020301528181610e6101528181610f30015281816115ba015281816116d701528181611d3a0152611f2a01526131396000f3fe6080604052600436106101c65760003560e01c806374b11d8a116100f7578063cb0e85a611610095578063eb11af9311610064578063eb11af9314610558578063edd146cc14610578578063ef2920fc14610598578063f5b0dfb7146105ab57600080fd5b8063cb0e85a6146104c5578063de1acc5c146104e4578063df868ed314610511578063e89e4ed61461052957600080fd5b8063b2b878d0116100d1578063b2b878d014610438578063b5f620ce14610465578063b9d7040b14610485578063caaed302146104a557600080fd5b806374b11d8a146103da5780639243b605146103f0578063a0cf0aea1461041057600080fd5b806343984ddb1161016457806351cff8d91161013e57806351cff8d91461034d5780635586ba331461036d578063570897391461039357806362812a39146103ad57600080fd5b806343984ddb146102f25780634ab4ba42146103085780634d31d0871461031d57600080fd5b80632bbe0cae116101a05780632bbe0cae1461026d578063369dc5b51461028057806338fff2d0146102a057806342fda9c7146102bf57600080fd5b80630a6f0ee9146101d257806315cc481e146101f45780632442e1cb1461024057600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed3660046124d9565b6105cb565b005b34801561020057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024c57600080fd5b5061026061025b366004612551565b6105eb565b6040516102379190612611565b61022361027b366004612653565b610711565b34801561028c57600080fd5b506101f261029b366004612551565b610736565b3480156102ac57600080fd5b506001545b604051908152602001610237565b3480156102cb57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102b1565b3480156102fe57600080fd5b506102b160075481565b34801561031457600080fd5b506002546102b1565b34801561032957600080fd5b5061033d6103383660046126a5565b61074d565b6040519015158152602001610237565b34801561035957600080fd5b506101f26103683660046126a5565b610758565b34801561037957600080fd5b50600454610223906201000090046001600160a01b031681565b34801561039f57600080fd5b5060045461033d9060ff1681565b3480156103b957600080fd5b506103cd6103c83660046126a5565b610783565b60405161023791906126c2565b3480156103e657600080fd5b506102b160065481565b3480156103fc57600080fd5b506101f261040b366004612719565b610794565b34801561041c57600080fd5b5061022373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561044457600080fd5b50610458610453366004612754565b610894565b6040516102379190612829565b34801561047157600080fd5b506101f261048036600461288f565b61092b565b34801561049157600080fd5b506101f26104a03660046128bb565b61093e565b3480156104b157600080fd5b506101f26104c0366004612551565b610b74565b3480156104d157600080fd5b5060045461033d90610100900460ff1681565b3480156104f057600080fd5b506105046104ff366004612551565b610c93565b6040516102379190612a0b565b34801561051d57600080fd5b5060005460ff1661033d565b34801561053557600080fd5b50610549610544366004612551565b610cc5565b60405161023793929190612a19565b34801561056457600080fd5b506105046105733660046126a5565b610da7565b34801561058457600080fd5b506101f2610593366004612a41565b610db2565b6101f26105a6366004612653565b610e12565b3480156105b757600080fd5b506101f26105c6366004612551565b610e2c565b6105d3610e56565b6105db610ea1565b6105e6838383610edd565b505050565b6105f36121ca565b6009828154811061060657610606612a88565b906000526020600020906004020160405180606001604052908160008201548152602001600182016040518060400160405290816000820154815260200160018201805461065390612a9e565b80601f016020809104026020016040519081016040528092919081815260200182805461067f90612a9e565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050919092525050508152600382015460209091019060ff1660068111156106f7576106f76125d9565b6006811115610708576107086125d9565b90525092915050565b600061071b610e56565b610723610ea1565b61072d8383611261565b90505b92915050565b3361074081611590565b61074982611642565b5050565b6000610730826116ba565b3361076281611590565b61076a61175f565b6000610776833061179c565b90506105e68333836117e5565b61078b612206565b6107308261181f565b6004546201000090046001600160a01b031633148015906107ce57506004546107cc906201000090046001600160a01b0316336119eb565b155b156107ec5760405163075fd2b160e01b815260040160405180910390fd5b6009546007541061081057604051632f1f68e160e11b815260040160405180910390fd5b600060096007548154811061082757610827612a88565b90600052602060002090600402019050818160010181816108489190612b26565b505060038101805460ff191660011790556007546040519081527fb8cc7b45ad9f94af049eb207914f37551e7d5c06a10c7fe73df91bbfc1643412906020015b60405180910390a15050565b60408051600180825281830190925260609160009190816020015b60408051808201909152600080825260208201528152602001906001900390816108af579050509050610906600460029054906101000a90046001600160a01b031660405180602001604052806000815250611b15565b8160008151811061091957610919612a88565b60209081029190910101529392505050565b3361093581611590565b61074982611c82565b3361094881611590565b600954156109d1576000600960008154811061096657610966612a88565b600091825260209091206003600490920201015460ff16600681111561098e5761098e6125d9565b146109c5576040517fb9463a6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109d16009600061224a565b8151600090815b81811015610b125760008582815181106109f4576109f4612a88565b602002602001015160000151905080600003610a2357604051632f1f68e160e11b815260040160405180910390fd5b610a2d8185612c35565b93506000868381518110610a4357610a43612a88565b6020026020010151604001906006811115610a6057610a606125d9565b90816006811115610a7357610a736125d9565b815250506009868381518110610a8b57610a8b612a88565b60209081029190910181015182546001818101855560009485529383902082516004909202019081558183015180519482019485559283015191939092916002840190610ad89082612c48565b505050604082015160038201805460ff19166001836006811115610afe57610afe6125d9565b021790555050600190920191506109d89050565b5081670de0b6b3a764000014610b3b57604051632f1f68e160e11b815260040160405180910390fd5b6040518181527f5d89f885f30c3150c167b2c31128bdf9a126180d134fa1d434f7edceae2881189060200160405180910390a150505050565b33610b7e81611590565b600160098381548110610b9357610b93612a88565b600091825260209091206003600490920201015460ff166006811115610bbb57610bbb6125d9565b14610bf2576040517f0abee44c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360098381548110610c0757610c07612a88565b60009182526020909120600360049092020101805460ff19166001836006811115610c3457610c346125d9565b02179055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e7008260098481548110610c6e57610c6e612a88565b6000918252602090912060036004909202010154604051610888929160ff1690612d08565b600060098281548110610ca857610ca8612a88565b600091825260209091206003600490920201015460ff1692915050565b60098181548110610cd557600080fd5b90600052602060002090600402016000915090508060000154908060010160405180604001604052908160008201548152602001600182018054610d1890612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4490612a9e565b8015610d915780601f10610d6657610100808354040283529160200191610d91565b820191906000526020600020905b815481529060010190602001808311610d7457829003601f168201915b5050509190925250505060039091015460ff1683565b600061073082611cc3565b600081806020019051810190610dc89190612d1c565b9050610dd48382611cd8565b7f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a8383604051610e05929190612d67565b60405180910390a1505050565b610e1a610e56565b610e22610ea1565b6107498282611df0565b610e34610e56565b8060026000828254610e469190612c35565b90915550610e5390508181565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610e9f5760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003610e9f576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee561175f565b80610eef81611590565b60095460075410610f1357604051632f1f68e160e11b815260040160405180910390fd5b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91610f679160040190815260200190565b600060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fac9190810190612e22565b90506000600960075481548110610fc557610fc5612a88565b60009182526020808320600480546201000090046001600160a01b039081168652600a84526040808720815160a081018352815460ff8082161515835261010090910490941696810196909652600181015491860191909152600281015495909202909201955091926060840191166006811115611045576110456125d9565b6006811115611056576110566125d9565b8152602001600382016040518060400160405290816000820154815260200160018201805461108490612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546110b090612a9e565b80156110fd5780601f106110d2576101008083540402835291602001916110fd565b820191906000526020600020905b8154815290600101906020018083116110e057829003601f168201915b5050509190925250505090525090506001600383015460ff166006811115611127576111276125d9565b1461114557604051632f1f68e160e11b815260040160405180910390fd5b6000670de0b6b3a7640000836000015483604001516111649190612ed6565b61116e9190612eed565b905080600260008282546111829190612f0f565b9250508190555061119c84604001518360200151836117e5565b60038301805460ff19166002179055600780549060006111bb83612f22565b91905055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e70060075460026040516111f4929190612d08565b60405180910390a1600454602083810151604080516001600160a01b03928316815292830185905289821683820152516201000090930416917fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9181900360600190a25050505050505050565b600061126b612013565b60008060008061128e604051806040016040528060008152602001606081525090565b878060200190518101906112a29190612f3b565b600454929750929550935090915060ff16806112c657506001600160a01b03831615155b9450846112d357866112d5565b825b95508480156112eb57506112e986886119eb565b155b156113095760405163075fd2b160e01b815260040160405180910390fd5b600454610100900460ff16801561132c5750602081015151158061132c57508051155b15611363576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065482111561139f576040517faf55723000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036113ad5760065491505b6001600160a01b0384166113e45760405163f4a513b960e01b81526001600160a01b03871660048201526024015b60405180910390fd5b6001600160a01b0386166000908152600a6020526040812090600282015460ff166006811115611416576114166125d9565b036114b557600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0389169081179091556040517fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906114a8908c908c90612fa9565b60405180910390a26114f9565b866001600160a01b03167faf5977db3aa7e6fc7d05e21c791ebd214afa76da27c8d8ddc8e4a9f742d7b2368a8a6040516114f0929190612fa9565b60405180910390a25b80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038716021781558561153d57805460ff16611540565b60015b815460ff191690151517815560018101839055815160038201908155602083015183919060048401906115739082612c48565b505050600201805460ff1916600117905550939695505050505050565b6001546040516329e40d4b60e01b815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116259190612fd4565b610e535760405163075fd2b160e01b815260040160405180910390fd5b60065481101561167e576040517ff96c278800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60068190556040518181527fbe1bfc6b02716ac59d6f9a0b32d161252bb03558ca6b238dbc66752cef8d2bb6906020015b60405180910390a150565b6001546040516329e40d4b60e01b81526000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916329e40d4b9161171e9186906004019182526001600160a01b0316602082015260400190565b602060405180830381865afa15801561173b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107309190612fd4565b60005460ff1615610e9f576040517fb186267000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016117d457506001600160a01b03811631610730565b6117de838361204f565b9050610730565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611814576105e68282612084565b6105e68383836120a0565b611827612206565b6001600160a01b038083166000908152600a6020908152604091829020825160a081018452815460ff8082161515835261010090910490951692810192909252600181015492820192909252600282015490926060840191166006811115611891576118916125d9565b60068111156118a2576118a26125d9565b815260200160038201604051806040016040529081600082015481526020016001820180546118d090612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546118fc90612a9e565b80156119495780601f1061191e57610100808354040283529160200191611949565b820191906000526020600020905b81548152906001019060200180831161192c57829003601f168201915b505050919092525050509052506004549091506201000090046001600160a01b03161580159061198d57506004546001600160a01b03838116620100009092041614155b156119e6576000816060015160068111156119aa576119aa6125d9565b116119b65760006119b9565b60035b816060019060068111156119cf576119cf6125d9565b908160068111156119e2576119e26125d9565b9052505b919050565b6005546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839291169063dd93da4390602401600060405180830381865afa158015611a52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a7a9190810190612ff1565b60055481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350911690635e8a791590604401602060405180830381865afa158015611ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0d9190612fd4565b949350505050565b604080518082018252600080825260208083018290526001600160a01b038681168352600a8252848320855160a081018752815460ff80821615158352610100909104909316938101939093526001810154958301959095526002850154939492939192916060840191166006811115611b9157611b916125d9565b6006811115611ba257611ba26125d9565b81526020016003820160405180604001604052908160008201548152602001600182018054611bd090612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054611bfc90612a9e565b8015611c495780601f10611c1e57610100808354040283529160200191611c49565b820191906000526020600020905b815481529060010190602001808311611c2c57829003601f168201915b505050919092525050509052506040805180820182526020808401516001600160a01b0316825291909201519082015291505092915050565b6000805460ff19168215159081179091556040519081527fd94c9bc4d43c51d8dc345a016d8e3d994432fac68e72832e4cf3a616bd8efae0906020016116af565b6000611cce8261181f565b6060015192915050565b611ce1826120ef565b6020818101516004805460408086015161ffff1990921693151561ff001916939093176101009115159190910217815581517f5ab1bd5300000000000000000000000000000000000000000000000000000000815291517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693635ab1bd539380840193919291908290030181865afa158015611d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dae91906130b8565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790558051611de690611642565b6107496001611c82565b611df8612157565b611e00612013565b80611e0a81611590565b600083806020019051810190611e2091906130d5565b600480547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b039485168102919091179182905590049091166000818152600a602052604090209192501580611e9a57506001600282015460ff166006811115611e9757611e976125d9565b14155b15611ecf576004805460405163f4a513b960e01b8152620100009091046001600160a01b0316918101919091526024016113db565b6002818101805460ff1916909117905560018101548214611f0357604051637fcce2a960e01b815260040160405180910390fd5b611f0d6000611c82565b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91611f619160040190815260200190565b600060405180830381865afa158015611f7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fa69190810190612e22565b60045460408281015181518781526001600160a01b03918216602082015289821681840152915193945062010000909204909116917f463ffc2cf8b1596445c417388ed30e53eb67cf6668cb2be7f0addf8a78c8441b9181900360600190a2505050506107496001600355565b60005460ff16610e9f576040517fcfe7975b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16107495763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166120e5576390b8ec186000526004601cfd5b6000603452505050565b6120f7610e56565b60015415612131576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000361215257604051637fcce2a960e01b815260040160405180910390fd5b600155565b6002600354036121c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016113db565b6002600355565b6040518060600160405280600081526020016121f9604051806040016040528060008152602001606081525090565b815260200160005b905290565b6040805160a0810182526000808252602082018190529181018290529060608201908152602001612201604051806040016040528060008152602001606081525090565b5080546000825560040290600052602060002090810190610e5391905b808211156122a0576000808255600182018181558161228960028501826122a4565b50505060038101805460ff19169055600401612267565b5090565b5080546122b090612a9e565b6000825580601f106122c0575050565b601f016020900490600052602060002090810190610e5391905b808211156122a057600081556001016122da565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715612327576123276122ee565b60405290565b6040805190810167ffffffffffffffff81118282101715612327576123276122ee565b60405160c0810167ffffffffffffffff81118282101715612327576123276122ee565b604051601f8201601f1916810167ffffffffffffffff8111828210171561239c5761239c6122ee565b604052919050565b600067ffffffffffffffff8211156123be576123be6122ee565b5060051b60200190565b6001600160a01b0381168114610e5357600080fd5b600082601f8301126123ee57600080fd5b813560206124036123fe836123a4565b612373565b82815260059290921b8401810191818101908684111561242257600080fd5b8286015b84811015612446578035612439816123c8565b8352918301918301612426565b509695505050505050565b600067ffffffffffffffff82111561246b5761246b6122ee565b50601f01601f191660200190565b60006124876123fe84612451565b905082815283838301111561249b57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126124c357600080fd5b6124d283833560208501612479565b9392505050565b6000806000606084860312156124ee57600080fd5b833567ffffffffffffffff8082111561250657600080fd5b612512878388016123dd565b9450602086013591508082111561252857600080fd5b50612535868287016124b2565b9250506040840135612546816123c8565b809150509250925092565b60006020828403121561256357600080fd5b5035919050565b60005b8381101561258557818101518382015260200161256d565b50506000910152565b600081518084526125a681602086016020860161256a565b601f01601f19169290920160200192915050565b805182526000602082015160406020850152611b0d604085018261258e565b634e487b7160e01b600052602160045260246000fd5b6007811061260d57634e487b7160e01b600052602160045260246000fd5b9052565b6020815281516020820152600060208301516060604084015261263760808401826125ba565b9050604084015161264b60608501826125ef565b509392505050565b6000806040838503121561266657600080fd5b823567ffffffffffffffff81111561267d57600080fd5b612689858286016124b2565b925050602083013561269a816123c8565b809150509250929050565b6000602082840312156126b757600080fd5b81356124d2816123c8565b602081528151151560208201526001600160a01b036020830151166040820152604082015160608201526000606083015161270060808401826125ef565b50608083015160a080840152611b0d60c08401826125ba565b60006020828403121561272b57600080fd5b813567ffffffffffffffff81111561274257600080fd5b8201604081850312156124d257600080fd5b6000806040838503121561276757600080fd5b823567ffffffffffffffff8082111561277f57600080fd5b61278b868387016123dd565b93506020915081850135818111156127a257600080fd5b8501601f810187136127b357600080fd5b80356127c16123fe826123a4565b81815260059190911b820184019084810190898311156127e057600080fd5b8584015b83811015612818578035868111156127fc5760008081fd5b61280a8c89838901016124b2565b8452509186019186016127e4565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561287457815180516001600160a01b03168552860151868501529284019290850190600101612846565b5091979650505050505050565b8015158114610e5357600080fd5b6000602082840312156128a157600080fd5b81356124d281612881565b8035600781106119e657600080fd5b6000602082840312156128cd57600080fd5b67ffffffffffffffff80833511156128e457600080fd5b8235830184601f8201126128f757600080fd5b6129046123fe82356123a4565b81358082526020808301929160051b8401018781111561292357600080fd5b602084015b818110156129fe57858135111561293e57600080fd5b80358501601f196060828c038201121561295757600080fd5b61295f612304565b6020830135815260408301358981111561297857600080fd5b83016040818e038401121561298c57600080fd5b61299461232d565b92506020810135835260408101358a8111156129af57600080fd5b01603f81018d136129bf57600080fd5b6129d18d602083013560408401612479565b6020840152508160208201526129e9606084016128ac565b60408201528652505060209384019301612928565b5090979650505050505050565b6020810161073082846125ef565b838152606060208201526000612a3260608301856125ba565b9050611b0d60408301846125ef565b60008060408385031215612a5457600080fd5b82359150602083013567ffffffffffffffff811115612a7257600080fd5b612a7e858286016124b2565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612ab257607f821691505b602082108103612ad257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105e657600081815260208120601f850160051c81016020861015612aff5750805b601f850160051c820191505b81811015612b1e57828155600101612b0b565b505050505050565b813581556001808201602080850135601e19863603018112612b4757600080fd5b8501803567ffffffffffffffff811115612b6057600080fd5b8036038383011315612b7157600080fd5b612b8581612b7f8654612a9e565b86612ad8565b6000601f821160018114612bbb5760008315612ba357508382018501355b600019600385901b1c1916600184901b178655612c14565b600086815260209020601f19841690835b82811015612beb57868501880135825593870193908901908701612bcc565b5084821015612c0a5760001960f88660031b161c198785880101351681555b50508683881b0186555b505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561073057610730612c1f565b815167ffffffffffffffff811115612c6257612c626122ee565b612c7681612c708454612a9e565b84612ad8565b602080601f831160018114612cab5760008415612c935750858301515b600019600386901b1c1916600185901b178555612b1e565b600085815260208120601f198616915b82811015612cda57888601518255948401946001909101908401612cbb565b5085821015612cf85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b828152604081016124d260208301846125ef565b600060608284031215612d2e57600080fd5b612d36612304565b825181526020830151612d4881612881565b60208201526040830151612d5b81612881565b60408201529392505050565b828152604060208201526000611b0d604083018461258e565b80516119e6816123c8565b600082601f830112612d9c57600080fd5b8151612daa6123fe82612451565b818152846020838601011115612dbf57600080fd5b611b0d82602083016020870161256a565b600060408284031215612de257600080fd5b612dea61232d565b905081518152602082015167ffffffffffffffff811115612e0a57600080fd5b612e1684828501612d8b565b60208301525092915050565b600060208284031215612e3457600080fd5b815167ffffffffffffffff80821115612e4c57600080fd5b9083019060c08286031215612e6057600080fd5b612e68612350565b825181526020830151612e7a816123c8565b60208201526040830151612e8d816123c8565b6040820152606083015182811115612ea457600080fd5b612eb087828601612dd0565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b808202811582820484141761073057610730612c1f565b600082612f0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561073057610730612c1f565b600060018201612f3457612f34612c1f565b5060010190565b60008060008060808587031215612f5157600080fd5b8451612f5c816123c8565b6020860151909450612f6d816123c8565b60408601516060870151919450925067ffffffffffffffff811115612f9157600080fd5b612f9d87828801612dd0565b91505092959194509250565b604081526000612fbc604083018561258e565b90506001600160a01b03831660208301529392505050565b600060208284031215612fe657600080fd5b81516124d281612881565b60006020828403121561300357600080fd5b815167ffffffffffffffff8082111561301b57600080fd5b9083019060c0828603121561302f57600080fd5b613037612350565b825181526020830151602082015260408301518281111561305757600080fd5b61306387828601612d8b565b60408301525060608301518281111561307b57600080fd5b61308787828601612dd0565b60608301525061309960808401612d80565b60808201526130aa60a08401612d80565b60a082015295945050505050565b6000602082840312156130ca57600080fd5b81516124d2816123c8565b600080604083850312156130e857600080fd5b82516130f3816123c8565b602093909301519294929350505056fea2646970667358221220cdc1dbd193b77181dcc1bad2e31acef1cadf1745f832a969464a85225890df9b64736f6c63430008130033"; diff --git a/dist/strategies/QVSimpleStrategy/types.d.ts b/dist/strategies/QVSimpleStrategy/types.d.ts new file mode 100644 index 0000000..05f40a1 --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/types.d.ts @@ -0,0 +1,28 @@ +import { Metadata } from "../../types"; +import { Status } from "../types"; +export type InitializeParams = { + registryGating: boolean; + metadataRequired: boolean; + reviewThreshold: bigint; + registrationStartTime: bigint; + registrationEndTime: bigint; + allocationStartTime: bigint; + allocationEndTime: bigint; +}; +export type InitializeParamsSimple = { + maxVoiceCreditsPerAllocator: bigint; + params: InitializeParams; +}; +export type Recipient = { + totalVotesReceived: bigint; + useRegistryAnchor: boolean; + recipientAddress: string; + metadata: Metadata; + recipientStatus: Status; + applicationId: bigint; +}; +export type Milestone = { + amountPercentage: bigint; + metadata: Metadata; + milestoneStatus: Status; +}; diff --git a/dist/strategies/QVSimpleStrategy/types.js b/dist/strategies/QVSimpleStrategy/types.js new file mode 100644 index 0000000..fed6f36 --- /dev/null +++ b/dist/strategies/QVSimpleStrategy/types.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// /// @notice The details of the allocator +// struct Allocator { +// // slot 0 +// uint256 voiceCredits; +// // slots [1...n] +// mapping(address => uint256) voiceCreditsCastToRecipient; +// mapping(address => uint256) votesCastToRecipient; +// } diff --git a/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.d.ts b/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.d.ts new file mode 100644 index 0000000..dede227 --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.d.ts @@ -0,0 +1,9 @@ +import { ConstructorArgs } from "../../types"; +export declare class RFPSimpleStrategy { + private client; + private contract; + private strategy; + private poolId; + private allo; + constructor({ chain, rpc, address, poolId }: ConstructorArgs); +} diff --git a/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.js b/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.js new file mode 100644 index 0000000..5161120 --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/RFPSimpleStrategy.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RFPSimpleStrategy = void 0; +const viem_1 = require("viem"); +const Allo_1 = require("../../Allo/Allo"); +const chains_config_1 = require("../../chains.config"); +const Client_1 = require("../../Client/Client"); +class RFPSimpleStrategy { + constructor({ chain, rpc, address, poolId }) { + const usedChain = (0, viem_1.extractChain)({ + chains: chains_config_1.supportedChains, + id: chain, + }); + this.client = (0, Client_1.create)(usedChain, rpc); + this.allo = new Allo_1.Allo({ chain, rpc }); + if (address) { + this.contract = (0, viem_1.getContract)({ + address: address, + abi: [], + publicClient: this.client, + }); + this.strategy = address; + } + this.poolId = poolId || BigInt(-1); + } +} +exports.RFPSimpleStrategy = RFPSimpleStrategy; diff --git a/dist/strategies/RFPSimpleStrategy/rfpSimple.config.d.ts b/dist/strategies/RFPSimpleStrategy/rfpSimple.config.d.ts new file mode 100644 index 0000000..48e926a --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/rfpSimple.config.d.ts @@ -0,0 +1,124 @@ +export declare const abi: ({ + type: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + stateMutability: string; + name?: undefined; + outputs?: undefined; + anonymous?: undefined; +} | { + type: string; + stateMutability: string; + inputs?: undefined; + name?: undefined; + outputs?: undefined; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + outputs: { + name: string; + type: string; + internalType: string; + components: ({ + name: string; + type: string; + internalType: string; + components?: undefined; + } | { + name: string; + type: string; + internalType: string; + components: { + name: string; + type: string; + internalType: string; + }[]; + })[]; + }[]; + stateMutability: string; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + outputs: ({ + name: string; + type: string; + internalType: string; + components?: undefined; + } | { + name: string; + type: string; + internalType: string; + components: { + name: string; + type: string; + internalType: string; + }[]; + })[]; + stateMutability: string; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + components: ({ + name: string; + type: string; + internalType: string; + components?: undefined; + } | { + name: string; + type: string; + internalType: string; + components: { + name: string; + type: string; + internalType: string; + }[]; + })[]; + }[]; + outputs: never[]; + stateMutability: string; + anonymous?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + indexed: boolean; + internalType: string; + }[]; + anonymous: boolean; + stateMutability?: undefined; + outputs?: undefined; +} | { + type: string; + name: string; + inputs: { + name: string; + type: string; + internalType: string; + }[]; + stateMutability?: undefined; + outputs?: undefined; + anonymous?: undefined; +})[]; +export declare const bytecode = "0x60c06040523480156200001157600080fd5b50604051620038bc380380620038bc8339810160408190526200003491620000c0565b6001600160a01b03821660805260405182908290829082906200005c9082906020016200019b565b60408051601f19818403018152919052805160209091012060a05250620001d0945050505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b75781810151838201526020016200009d565b50506000910152565b60008060408385031215620000d457600080fd5b82516001600160a01b0381168114620000ec57600080fd5b60208401519092506001600160401b03808211156200010a57600080fd5b818501915085601f8301126200011f57600080fd5b81518181111562000134576200013462000084565b604051601f8201601f19908116603f011681019083821181831017156200015f576200015f62000084565b816040528281528860208487010111156200017957600080fd5b6200018c8360208301602088016200009a565b80955050505050509250929050565b6020815260008251806020840152620001bc8160408501602087016200009a565b601f01601f19169190910160400192915050565b60805160a0516136aa62000212600039600061041a01526000818161030b01528181611141015281816111d4015281816113710152611e4c01526136aa6000f3fe60806040526004361061026e5760003560e01c806362812a3911610153578063cb0e85a6116100cb578063eb11af931161007f578063edd146cc11610064578063edd146cc146107b7578063ef2920fc146107d7578063f5b0dfb7146107ea57600080fd5b8063eb11af9314610765578063eb8203121461078557600080fd5b8063d2e17f59116100b0578063d2e17f59146106fb578063df868ed314610723578063dff7d2c71461073857600080fd5b8063cb0e85a61461068e578063cf96453b146106ad57600080fd5b80639af5c09d11610122578063a647d23e11610107578063a647d23e1461061a578063ac9650d814610634578063b2b878d01461066157600080fd5b80639af5c09d146105d1578063a0cf0aea146105f257600080fd5b806362812a39146105165780637c1887dd146105435780637f8359831461058157806381f03fcb146105a157600080fd5b806341f44125116101e65780634ab4ba42116101b557806351cff8d91161019a57806351cff8d9146104ca57806357825849146104ea578063590107011461050057600080fd5b80634ab4ba42146104955780634d31d087146104aa57600080fd5b806341f44125146103eb57806342fda9c71461040b5780634533d6781461043e5780634a4f8e041461047f57600080fd5b80632143e92f1161023d578063259d6dde11610222578063259d6dde146103935780632bbe0cae146103c357806338fff2d0146103d657600080fd5b80632143e92f14610343578063217550881461036357600080fd5b806307fca3811461027a578063084ea36e1461029c5780630a6f0ee9146102dc57806315cc481e146102fc57600080fd5b3661027557005b600080fd5b34801561028657600080fd5b5061029a61029536600461274b565b61080a565b005b3480156102a857600080fd5b506102c96102b736600461274b565b60086020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b5061029a6102f7366004612936565b61086d565b34801561030857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016102d3565b34801561034f57600080fd5b5061029a61035e3660046129c4565b61088d565b34801561036f57600080fd5b506006546103839062010000900460ff1681565b60405190151581526020016102d3565b34801561039f57600080fd5b506103836103ae36600461274b565b600d6020526000908152604090205460ff1681565b61032b6103d1366004612a20565b6108aa565b3480156103e257600080fd5b506001546102c9565b3480156103f757600080fd5b5061029a61040636600461274b565b6108cf565b34801561041757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102c9565b34801561044a57600080fd5b5060055461046690600160c01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102d3565b34801561048b57600080fd5b506102c9600c5481565b3480156104a157600080fd5b506002546102c9565b3480156104b657600080fd5b506103836104c536600461274b565b61092d565b3480156104d657600080fd5b5061029a6104e536600461274b565b61094e565b3480156104f657600080fd5b506102c960045481565b34801561050c57600080fd5b506102c960035481565b34801561052257600080fd5b5061053661053136600461274b565b6109bb565b6040516102d39190612b19565b34801561054f57600080fd5b506102c961055e366004612b9b565b600a60209081526000938452604080852082529284528284209052825290205481565b34801561058d57600080fd5b5061029a61059c366004612c25565b6109cc565b3480156105ad57600080fd5b506103836105bc36600461274b565b60096020526000908152604090205460ff1681565b3480156105dd57600080fd5b506005546104669067ffffffffffffffff1681565b3480156105fe57600080fd5b5061032b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561062657600080fd5b506006546103839060ff1681565b34801561064057600080fd5b5061065461064f366004612c91565b610d27565b6040516102d39190612cd3565b34801561066d57600080fd5b5061068161067c366004612d35565b610e1c565b6040516102d39190612e0a565b34801561069a57600080fd5b5060065461038390610100900460ff1681565b3480156106b957600080fd5b506106ee6106c8366004612e62565b600b60209081526000938452604080852082529284528284209052825290205460ff1681565b6040516102d39190612e99565b34801561070757600080fd5b5060055461046690600160801b900467ffffffffffffffff1681565b34801561072f57600080fd5b50610383610f34565b34801561074457600080fd5b506005546104669068010000000000000000900467ffffffffffffffff1681565b34801561077157600080fd5b506106ee61078036600461274b565b610f43565b34801561079157600080fd5b506107a56107a036600461274b565b610f4e565b6040516102d396959493929190612ea7565b3480156107c357600080fd5b5061029a6107d2366004612ef7565b61103b565b61029a6107e5366004612a20565b6110ad565b3480156107f657600080fd5b5061029a610805366004612f3e565b6110cb565b33610814816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916905590513381527f4ddda4f889f9f60f81c0cccbc54ac7d1eb39b079ab7f29c2a1ceda4e0187085f91015b60405180910390a25050565b6108756111c9565b61087d611214565b610888838383611250565b505050565b33610897816110fe565b6108a3858585856114c0565b5050505050565b60006108b46111c9565b6108bc611214565b6108c6838361165a565b90505b92915050565b336108d9816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916600117905590513381527fc5137efba0dae412f1520f1f5633a45f7831a93f83d0db6c31d7fc2a877b88879101610861565b6001600160a01b0381166000908152600d602052604081205460ff166108c9565b33610958816110fe565b60055461097990600160c01b900467ffffffffffffffff1662278d00612f6d565b67ffffffffffffffff1642116109a257604051637fcce2a960e01b815260040160405180910390fd5b60006109ae83306119b4565b90506108888333836119fd565b6109c36126da565b6108c982611a37565b336109d6816110fe565b6109de611b7a565b838281146109ff57604051637fcce2a960e01b815260040160405180910390fd5b60005b81811015610d1e576000858583818110610a1e57610a1e612f8e565b9050602002016020810190610a339190612fa4565b90506000888884818110610a4957610a49612f8e565b9050602002016020810190610a5e919061274b565b6001600160a01b038116600090815260076020526040812060058101549293509190846006811115610a9257610a92612ae1565b1480610aaf57506004846006811115610aad57610aad612ae1565b145b15610add5760405163f4a513b960e01b81526001600160a01b03841660048201526024015b60405180910390fd5b6001600160a01b0383166000908152600b60209081526040808320848452825280832033845290915281205460ff166006811115610b1d57610b1d612ae1565b1115610b475760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b6001600160a01b0383166000908152600b6020908152604080832084845282528083203384529091529020805485919060ff19166001836006811115610b8f57610b8f612ae1565b02179055506001600160a01b0383166000908152600a60209081526040808320848452909152812090856006811115610bca57610bca612ae1565b6006811115610bdb57610bdb612ae1565b81526020019081526020016000206000815480929190610bfa90612fbf565b90915550506004546001600160a01b0384166000908152600a60209081526040808320858452909152812090866006811115610c3857610c38612ae1565b6006811115610c4957610c49612ae1565b81526020019081526020016000205410610cca5760048201805485919060ff19166001836006811115610c7e57610c7e612ae1565b0217905550826001600160a01b03167f8d3031e5c1c3d32d10a32b857e83ec347f244057dc2dfaf266600cdc7f97c27382866000604051610cc193929190612fd8565b60405180910390a25b826001600160a01b03167f296facfa5767c7b9c26d407470403f9cd96181a04e27329e4d006a59b458c6b3828633604051610d0793929190612fd8565b60405180910390a284600101945050505050610a02565b50505050505050565b60608167ffffffffffffffff811115610d4257610d4261276f565b604051908082528060200260200182016040528015610d7557816020015b6060815260200190600190039081610d605790505b50905060005b82811015610e1557610de530858584818110610d9957610d99612f8e565b9050602002810190610dab9190613003565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bad92505050565b828281518110610df757610df7612f8e565b60200260200101819052508080610e0d90612fbf565b915050610d7b565b5092915050565b81518151606091908114610e5c576040517f7b49805600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610e7757610e7761276f565b604051908082528060200260200182016040528015610ebc57816020015b6040805180820190915260008082526020820152815260200190600190039081610e955790505b50905060005b82811015610f2b57610f06868281518110610edf57610edf612f8e565b6020026020010151868381518110610ef957610ef9612f8e565b6020026020010151611bd2565b828281518110610f1857610f18612f8e565b6020908102919091010152600101610ec2565b50949350505050565b6000610f3e611d8d565b905090565b60006108c982611dd7565b6007602090815260009182526040918290208054600182015484518086019095526002830180548652600384018054939660ff8416966101009094046001600160a01b03169594909384019190610fa49061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd09061304a565b801561101d5780601f10610ff25761010080835404028352916020019161101d565b820191906000526020600020905b81548152906001019060200180831161100057829003601f168201915b505050919092525050506004820154600590920154909160ff169086565b6110436111c9565b600081806020019051810190611059919061308e565b9050611069838260200151611dec565b8051600c556040517f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a906110a0908590859061314e565b60405180910390a1505050565b6110b56111c9565b6110bd611214565b6110c78282611f0c565b5050565b6110d36111c9565b6110dc81611fec565b80600260008282546110ee9190613167565b909155506110fb90508181565b50565b6001546040517f29e40d4b00000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ac919061317a565b6110fb5760405163075fd2b160e01b815260040160405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112125760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003611212576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061125a816110fe565b611262612016565b835160005b8181101561149757600086828151811061128357611283612f8e565b60200260200101519050600060076000836001600160a01b03166001600160a01b03168152602001908152602001600020905060006112d18360405180602001604052806000815250611bd2565b6020808201516001600160a01b038616600090815260099092526040909120549192509060ff1680611309575061130784612062565b155b80611312575080155b1561133b5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b6001546040517f068bcd8d0000000000000000000000000000000000000000000000000000000081526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d916113a89160040190815260200190565b600060405180830381865afa1580156113c5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113ed9190810190613237565b604081015160018601549192506114129161010090046001600160a01b0316846119fd565b6001600160a01b03858116600081815260096020908152604091829020805460ff19166001908117909155880154825161010090910485168152908101869052928c1690830152907fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9060600160405180910390a28560010195505050505050611267565b5060065462010000900460ff166108a3576006805462ff00001916620100001790555050505050565b8367ffffffffffffffff164211806114eb57508267ffffffffffffffff168467ffffffffffffffff16115b8061150957508167ffffffffffffffff168467ffffffffffffffff16115b8061152757508067ffffffffffffffff168267ffffffffffffffff16115b8061154557508067ffffffffffffffff168367ffffffffffffffff16115b1561156357604051637fcce2a960e01b815260040160405180910390fd5b6005805467ffffffffffffffff838116600160c01b90810277ffffffffffffffffffffffffffffffffffffffffffffffff878416600160801b908102919091166fffffffffffffffffffffffffffffffff8a8616680100000000000000009081027fffffffffffffffffffffffffffffffff000000000000000000000000000000009098168d88161797909717161791909117948590556040805186851681529486048416602086015290850483169084015290920490911660608201523360808201527fcb0fb7a7b87db2f472ee8977444cfdbc51993ce660aca27a5969a724fae6dcf39060a00160405180910390a150505050565b600061166461209d565b6000806000611686604051806040016040528060008152602001606081525090565b60065460ff16156116d857868060200190518101906116a591906132eb565b919650945090506116b68587612107565b6116d35760405163075fd2b160e01b815260040160405180910390fd5b611742565b868060200190518101906116ec91906132eb565b91955093506001600160a01b0384161515925090508161170c578561170e565b825b945081801561172457506117228587612107565b155b156117425760405163075fd2b160e01b815260040160405180910390fd5b600654610100900460ff1680156117655750602081015151158061176557508051155b1561179c576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166117ce5760405163f4a513b960e01b81526001600160a01b0386166004820152602401610ad4565b6001600160a01b038086166000908152600760209081526040909120600181018054938816610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909416939093179092558251600283019081559083015183919060038401906118419082613395565b505060065460ff1690506118555782611858565b60015b60018201805460ff191691151591909117905560058101805460009061187d90612fbf565b90915550600481015460ff16600081600681111561189d5761189d612ae1565b036118fb5760048201805460ff191660011790556040516001600160a01b038816907fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906118ee908c908c90613455565b60405180910390a26119a8565b600381600681111561190f5761190f612ae1565b03611929576004828101805460ff19169091179055611952565b600281600681111561193d5761193d612ae1565b036119525760048201805460ff191660011790555b600582015460048301546040516001600160a01b038a16927f63220f42dd2285448c45b5c8b4140e605629fd1394a1b2431a0ab0efd904e14a9261199f928e918e9160ff90911690613480565b60405180910390a25b50505050505092915050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016119ec57506001600160a01b038116316108c9565b6119f68383612243565b90506108c9565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611a2c576108888282612278565b610888838383612294565b611a3f6126da565b6001600160a01b03808316600090815260076020908152604091829020825160c08101845281548152600182015460ff8116151582850152610100900490941684840152825180840190935260028101805484526003820180549294606087019490939084019190611ab09061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611adc9061304a565b8015611b295780601f10611afe57610100808354040283529160200191611b29565b820191906000526020600020905b815481529060010190602001808311611b0c57829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611b5457611b54612ae1565b6006811115611b6557611b65612ae1565b81526020016005820154815250509050919050565b600554600160c01b900467ffffffffffffffff164211156112125760405162b828c960e81b815260040160405180910390fd5b60606108c6838360405180606001604052806027815260200161364e602791396122e3565b604080518082018252600080825260208083018290526001600160a01b03868116835260078252848320855160c08101875281548152600182015460ff811615158286015261010090049092168287015285518087019096526002810180548752600382018054969795969395929460608701949084019190611c549061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611c809061304a565b8015611ccd5780601f10611ca257610100808354040283529160200191611ccd565b820191906000526020600020905b815481529060010190602001808311611cb057829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611cf857611cf8612ae1565b6006811115611d0957611d09612ae1565b8152600591909101546020918201526001600160a01b0386166000908152600990915260408120549192509060ff16158015611d46575060035415155b15611d6a576003548251600254611d5d91906134c0565b611d6791906134d7565b90505b6040805180820182529201516001600160a01b0316825260208201529392505050565b6005546000904267ffffffffffffffff90911611801590611dc6575060055468010000000000000000900467ffffffffffffffff164211155b15611dd15750600190565b50600090565b6000611de282611a37565b6080015192915050565b611df58261235b565b80516006805460208085015161ffff1990921693151561ff0019169390931761010091151591909102179055604080517f5ab1bd5300000000000000000000000000000000000000000000000000000000815290517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692635ab1bd5392600480820193918290030181865afa158015611e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebf91906134f9565b600660036101000a8154816001600160a01b0302191690836001600160a01b0316021790555080604001516004819055506110c7816060015182608001518360a001518460c001516114c0565b60008083806020019051810190611f239190613516565b6001600160a01b038281166000908152600760209081526040808320938916835260088252808320600d909252909120549395509193509160ff16611f7b5760405163075fd2b160e01b815260040160405180910390fd5b611f8484612062565b611fac5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b611fba8382600001546123c3565b611fd757604051637fcce2a960e01b815260040160405180910390fd5b611fe481838686896123dc565b505050505050565b60065462010000900460ff16156110fb57604051637fcce2a960e01b815260040160405180910390fd5b600554600160c01b900467ffffffffffffffff164211611212576040517f8a879da200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060026001600160a01b03831660009081526007602052604090206004015460ff16600681111561209657612096612ae1565b1492915050565b6005544267ffffffffffffffff90911611806120d0575060055468010000000000000000900467ffffffffffffffff1642115b15611212576040517fb609ed5a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839263010000009091049091169063dd93da4390602401600060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261219f9190810190613544565b60065481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350630100000090910490911690635e8a791590604401602060405180830381865afa158015612217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223b919061317a565b949350505050565b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16110c75763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166122d9576390b8ec186000526004601cfd5b6000603452505050565b6060600080856001600160a01b031685604051612300919061360b565b600060405180830381855af49150503d806000811461233b576040519150601f19603f3d011682016040523d82523d6000602084013e612340565b606091505b50915091506123518683838761258d565b9695505050505050565b6123636111c9565b6001541561239d576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036123be57604051637fcce2a960e01b815260040160405180910390fd5b600155565b600c546000906123d38385613167565b11159392505050565b6123e4612606565b8160000361240557604051637fcce2a960e01b815260040160405180910390fd5b61240e83612062565b6124365760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b8185600001600082825461244a9190613167565b90915550506001600160a01b03831660009081526001860160209081526040808320546002890190925282205490916124838386613167565b905060006124a161249c83670de0b6b3a76400006134c0565b612657565b90506124ad8382613627565b905080600360008282546124c19190613167565b90915550508754819089906000906124da908490613167565b90915550506001600160a01b038716600090815260018a01602052604081208054889290612509908490613167565b90915550506001600160a01b038716600090815260028a01602052604081208054839290612538908490613167565b9091555050604080518281526001600160a01b0387811660208301528916917fe19137169fc4bceb2391a0921a61084851c12884df4897f569ec45a4ee46b7e3910160405180910390a2505050505050505050565b606083156125fc5782516000036125f5576001600160a01b0385163b6125f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad4565b508161223b565b61223b83836126b0565b60055442600160801b90910467ffffffffffffffff16118061263a5750600554600160c01b900467ffffffffffffffff1642115b156112125760405162b828c960e81b815260040160405180910390fd5b6000806002612667846001613167565b61267191906134d7565b90508291505b818110156126aa5790508060028161268f81866134d7565b6126999190613167565b6126a391906134d7565b9050612677565b50919050565b8151156126c05781518083602001fd5b8060405162461bcd60e51b8152600401610ad4919061363a565b6040518060c001604052806000815260200160001515815260200160006001600160a01b03168152602001612722604051806040016040528060008152602001606081525090565b815260200160008152602001600081525090565b6001600160a01b03811681146110fb57600080fd5b60006020828403121561275d57600080fd5b813561276881612736565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156127a8576127a861276f565b60405290565b60405160e0810167ffffffffffffffff811182821017156127a8576127a861276f565b60405160c0810167ffffffffffffffff811182821017156127a8576127a861276f565b604051601f8201601f1916810167ffffffffffffffff8111828210171561281d5761281d61276f565b604052919050565b600067ffffffffffffffff82111561283f5761283f61276f565b5060051b60200190565b600082601f83011261285a57600080fd5b8135602061286f61286a83612825565b6127f4565b82815260059290921b8401810191818101908684111561288e57600080fd5b8286015b848110156128b25780356128a581612736565b8352918301918301612892565b509695505050505050565b600067ffffffffffffffff8211156128d7576128d761276f565b50601f01601f191660200190565b600082601f8301126128f657600080fd5b813561290461286a826128bd565b81815284602083860101111561291957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561294b57600080fd5b833567ffffffffffffffff8082111561296357600080fd5b61296f87838801612849565b9450602086013591508082111561298557600080fd5b50612992868287016128e5565b92505060408401356129a381612736565b809150509250925092565b67ffffffffffffffff811681146110fb57600080fd5b600080600080608085870312156129da57600080fd5b84356129e5816129ae565b935060208501356129f5816129ae565b92506040850135612a05816129ae565b91506060850135612a15816129ae565b939692955090935050565b60008060408385031215612a3357600080fd5b823567ffffffffffffffff811115612a4a57600080fd5b612a56858286016128e5565b9250506020830135612a6781612736565b809150509250929050565b60005b83811015612a8d578181015183820152602001612a75565b50506000910152565b60008151808452612aae816020860160208601612a72565b601f01601f19169290920160200192915050565b80518252600060208201516040602085015261223b6040850182612a96565b634e487b7160e01b600052602160045260246000fd5b60078110612b1557634e487b7160e01b600052602160045260246000fd5b9052565b60208152815160208201526020820151151560408201526001600160a01b0360408301511660608201526000606083015160c06080840152612b5e60e0840182612ac2565b90506080840151612b7260a0850182612af7565b5060a084015160c08401528091505092915050565b803560078110612b9657600080fd5b919050565b600080600060608486031215612bb057600080fd5b8335612bbb81612736565b925060208401359150612bd060408501612b87565b90509250925092565b60008083601f840112612beb57600080fd5b50813567ffffffffffffffff811115612c0357600080fd5b6020830191508360208260051b8501011115612c1e57600080fd5b9250929050565b60008060008060408587031215612c3b57600080fd5b843567ffffffffffffffff80821115612c5357600080fd5b612c5f88838901612bd9565b90965094506020870135915080821115612c7857600080fd5b50612c8587828801612bd9565b95989497509550505050565b60008060208385031215612ca457600080fd5b823567ffffffffffffffff811115612cbb57600080fd5b612cc785828601612bd9565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612d2857603f19888603018452612d16858351612a96565b94509285019290850190600101612cfa565b5092979650505050505050565b60008060408385031215612d4857600080fd5b823567ffffffffffffffff80821115612d6057600080fd5b612d6c86838701612849565b9350602091508185013581811115612d8357600080fd5b8501601f81018713612d9457600080fd5b8035612da261286a82612825565b81815260059190911b82018401908481019089831115612dc157600080fd5b8584015b83811015612df957803586811115612ddd5760008081fd5b612deb8c89838901016128e5565b845250918601918601612dc5565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b82811015612e5557815180516001600160a01b03168552860151868501529284019290850190600101612e27565b5091979650505050505050565b600080600060608486031215612e7757600080fd5b8335612e8281612736565b92506020840135915060408401356129a381612736565b602081016108c98284612af7565b86815285151560208201526001600160a01b038516604082015260c060608201526000612ed760c0830186612ac2565b9050612ee66080830185612af7565b8260a0830152979650505050505050565b60008060408385031215612f0a57600080fd5b82359150602083013567ffffffffffffffff811115612f2857600080fd5b612f34858286016128e5565b9150509250929050565b600060208284031215612f5057600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115610e1557610e15612f57565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612fb657600080fd5b6108c682612b87565b600060018201612fd157612fd1612f57565b5060010190565b83815260608101612fec6020830185612af7565b6001600160a01b0383166040830152949350505050565b6000808335601e1984360301811261301a57600080fd5b83018035915067ffffffffffffffff82111561303557600080fd5b602001915036819003821315612c1e57600080fd5b600181811c9082168061305e57607f821691505b6020821081036126aa57634e487b7160e01b600052602260045260246000fd5b80518015158114612b9657600080fd5b60008183036101008112156130a257600080fd5b6130aa612785565b8351815260e0601f19830112156130c057600080fd5b6130c86127ae565b91506130d66020850161307e565b82526130e46040850161307e565b6020830152606084015160408301526080840151613101816129ae565b606083015260a0840151613114816129ae565b608083015260c0840151613127816129ae565b60a083015260e084015161313a816129ae565b60c083015260208101919091529392505050565b82815260406020820152600061223b6040830184612a96565b808201808211156108c9576108c9612f57565b60006020828403121561318c57600080fd5b6108c68261307e565b8051612b9681612736565b600082601f8301126131b157600080fd5b81516131bf61286a826128bd565b8181528460208386010111156131d457600080fd5b61223b826020830160208701612a72565b6000604082840312156131f757600080fd5b6131ff612785565b905081518152602082015167ffffffffffffffff81111561321f57600080fd5b61322b848285016131a0565b60208301525092915050565b60006020828403121561324957600080fd5b815167ffffffffffffffff8082111561326157600080fd5b9083019060c0828603121561327557600080fd5b61327d6127d1565b82518152602083015161328f81612736565b602082015260408301516132a281612736565b60408201526060830151828111156132b957600080fd5b6132c5878286016131e5565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b60008060006060848603121561330057600080fd5b835161330b81612736565b602085015190935061331c81612736565b604085015190925067ffffffffffffffff81111561333957600080fd5b613345868287016131e5565b9150509250925092565b601f82111561088857600081815260208120601f850160051c810160208610156133765750805b601f850160051c820191505b81811015611fe457828155600101613382565b815167ffffffffffffffff8111156133af576133af61276f565b6133c3816133bd845461304a565b8461334f565b602080601f8311600181146133f857600084156133e05750858301515b600019600386901b1c1916600185901b178555611fe4565b600085815260208120601f198616915b8281101561342757888601518255948401946001909101908401613408565b50858210156134455787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006134686040830185612a96565b90506001600160a01b03831660208301529392505050565b8481526080602082015260006134996080830186612a96565b90506001600160a01b03841660408301526134b76060830184612af7565b95945050505050565b80820281158282048414176108c9576108c9612f57565b6000826134f457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561350b57600080fd5b815161276881612736565b6000806040838503121561352957600080fd5b825161353481612736565b6020939093015192949293505050565b60006020828403121561355657600080fd5b815167ffffffffffffffff8082111561356e57600080fd5b9083019060c0828603121561358257600080fd5b61358a6127d1565b82518152602083015160208201526040830151828111156135aa57600080fd5b6135b6878286016131a0565b6040830152506060830151828111156135ce57600080fd5b6135da878286016131e5565b6060830152506135ec60808401613195565b60808201526135fd60a08401613195565b60a082015295945050505050565b6000825161361d818460208701612a72565b9190910192915050565b818103818111156108c9576108c9612f57565b6020815260006108c66020830184612a9656fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f15b0c2d6e8bec4e4fd5e22a5042b1673d24fb24a00e3edc2f6640bec04867c464736f6c63430008130033"; diff --git a/dist/strategies/RFPSimpleStrategy/rfpSimple.config.js b/dist/strategies/RFPSimpleStrategy/rfpSimple.config.js new file mode 100644 index 0000000..c594a0c --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/rfpSimple.config.js @@ -0,0 +1,595 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bytecode = exports.abi = void 0; +exports.abi = [ + { + type: "constructor", + inputs: [ + { name: "_allo", type: "address", internalType: "address" }, + { name: "_name", type: "string", internalType: "string" }, + ], + stateMutability: "nonpayable", + }, + { type: "receive", stateMutability: "payable" }, + { + type: "function", + name: "NATIVE", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "acceptedRecipientId", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocate", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "distribute", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getAllo", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IAllo" }], + stateMutability: "view", + }, + { + type: "function", + name: "getMilestone", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct RFPSimpleStrategy.Milestone", + components: [ + { + name: "amountPercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getMilestoneStatus", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPayouts", + inputs: [ + { name: "", type: "address[]", internalType: "address[]" }, + { name: "", type: "bytes[]", internalType: "bytes[]" }, + ], + outputs: [ + { + name: "", + type: "tuple[]", + internalType: "struct IStrategy.PayoutSummary[]", + components: [ + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "amount", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolAmount", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolId", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipient", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct RFPSimpleStrategy.Recipient", + components: [ + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "proposalBid", type: "uint256", internalType: "uint256" }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipientStatus", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getStrategyId", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + name: "increaseMaxBid", + inputs: [{ name: "_maxBid", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "increasePoolAmount", + inputs: [{ name: "_amount", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "initialize", + inputs: [ + { name: "_poolId", type: "uint256", internalType: "uint256" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isPoolActive", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isValidAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "maxBid", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "metadataRequired", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "milestones", + inputs: [{ name: "", type: "uint256", internalType: "uint256" }], + outputs: [ + { name: "amountPercentage", type: "uint256", internalType: "uint256" }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "registerRecipient", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "recipientId", type: "address", internalType: "address" }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "rejectMilestone", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMilestones", + inputs: [ + { + name: "_milestones", + type: "tuple[]", + internalType: "struct RFPSimpleStrategy.Milestone[]", + components: [ + { + name: "amountPercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setPoolActive", + inputs: [{ name: "_flag", type: "bool", internalType: "bool" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "submitUpcomingMilestone", + inputs: [ + { + name: "_metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upcomingMilestone", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "useRegistryAnchor", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "withdraw", + inputs: [{ name: "_token", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "token", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Distributed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "recipientAddress", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "poolId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + ], + anonymous: false, + }, + { + type: "event", + name: "MaxBidIncreased", + inputs: [ + { + name: "maxBid", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilestoneStatusChanged", + inputs: [ + { + name: "milestoneId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilestonesSet", + inputs: [ + { + name: "milestonesLength", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilstoneSubmitted", + inputs: [ + { + name: "milestoneId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "PoolActive", + inputs: [ + { name: "active", type: "bool", indexed: false, internalType: "bool" }, + ], + anonymous: false, + }, + { + type: "event", + name: "Registered", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdatedRegistration", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { type: "error", name: "ALLOCATION_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ENDED", inputs: [] }, + { type: "error", name: "ALREADY_INITIALIZED", inputs: [] }, + { type: "error", name: "AMOUNT_MISMATCH", inputs: [] }, + { type: "error", name: "AMOUNT_TOO_LOW", inputs: [] }, + { type: "error", name: "ANCHOR_ERROR", inputs: [] }, + { type: "error", name: "ARRAY_MISMATCH", inputs: [] }, + { type: "error", name: "EXCEEDING_MAX_BID", inputs: [] }, + { type: "error", name: "EXCESS_AMOUNT_SENT", inputs: [] }, + { type: "error", name: "INVALID", inputs: [] }, + { type: "error", name: "INVALID_ADDRESS", inputs: [] }, + { type: "error", name: "INVALID_FEE", inputs: [] }, + { type: "error", name: "INVALID_METADATA", inputs: [] }, + { type: "error", name: "INVALID_MILESTONE", inputs: [] }, + { type: "error", name: "INVALID_REGISTRATION", inputs: [] }, + { type: "error", name: "IS_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "MILESTONES_ALREADY_SET", inputs: [] }, + { type: "error", name: "MILESTONE_NOT_PENDING", inputs: [] }, + { type: "error", name: "MISMATCH", inputs: [] }, + { type: "error", name: "NONCE_NOT_AVAILABLE", inputs: [] }, + { type: "error", name: "NON_ZERO_VALUE", inputs: [] }, + { type: "error", name: "NOT_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "NOT_ENOUGH_FUNDS", inputs: [] }, + { type: "error", name: "NOT_IMPLEMENTED", inputs: [] }, + { type: "error", name: "NOT_INITIALIZED", inputs: [] }, + { type: "error", name: "NOT_PENDING_OWNER", inputs: [] }, + { type: "error", name: "POOL_ACTIVE", inputs: [] }, + { type: "error", name: "POOL_INACTIVE", inputs: [] }, + { type: "error", name: "RECIPIENT_ALREADY_ACCEPTED", inputs: [] }, + { + type: "error", + name: "RECIPIENT_ERROR", + inputs: [{ name: "recipientId", type: "address", internalType: "address" }], + }, + { type: "error", name: "RECIPIENT_NOT_ACCEPTED", inputs: [] }, + { type: "error", name: "REGISTRATION_ACTIVE", inputs: [] }, + { type: "error", name: "REGISTRATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "UNAUTHORIZED", inputs: [] }, + { type: "error", name: "ZERO_ADDRESS", inputs: [] }, +]; +exports.bytecode = "0x60c06040523480156200001157600080fd5b50604051620038bc380380620038bc8339810160408190526200003491620000c0565b6001600160a01b03821660805260405182908290829082906200005c9082906020016200019b565b60408051601f19818403018152919052805160209091012060a05250620001d0945050505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b75781810151838201526020016200009d565b50506000910152565b60008060408385031215620000d457600080fd5b82516001600160a01b0381168114620000ec57600080fd5b60208401519092506001600160401b03808211156200010a57600080fd5b818501915085601f8301126200011f57600080fd5b81518181111562000134576200013462000084565b604051601f8201601f19908116603f011681019083821181831017156200015f576200015f62000084565b816040528281528860208487010111156200017957600080fd5b6200018c8360208301602088016200009a565b80955050505050509250929050565b6020815260008251806020840152620001bc8160408501602087016200009a565b601f01601f19169190910160400192915050565b60805160a0516136aa62000212600039600061041a01526000818161030b01528181611141015281816111d4015281816113710152611e4c01526136aa6000f3fe60806040526004361061026e5760003560e01c806362812a3911610153578063cb0e85a6116100cb578063eb11af931161007f578063edd146cc11610064578063edd146cc146107b7578063ef2920fc146107d7578063f5b0dfb7146107ea57600080fd5b8063eb11af9314610765578063eb8203121461078557600080fd5b8063d2e17f59116100b0578063d2e17f59146106fb578063df868ed314610723578063dff7d2c71461073857600080fd5b8063cb0e85a61461068e578063cf96453b146106ad57600080fd5b80639af5c09d11610122578063a647d23e11610107578063a647d23e1461061a578063ac9650d814610634578063b2b878d01461066157600080fd5b80639af5c09d146105d1578063a0cf0aea146105f257600080fd5b806362812a39146105165780637c1887dd146105435780637f8359831461058157806381f03fcb146105a157600080fd5b806341f44125116101e65780634ab4ba42116101b557806351cff8d91161019a57806351cff8d9146104ca57806357825849146104ea578063590107011461050057600080fd5b80634ab4ba42146104955780634d31d087146104aa57600080fd5b806341f44125146103eb57806342fda9c71461040b5780634533d6781461043e5780634a4f8e041461047f57600080fd5b80632143e92f1161023d578063259d6dde11610222578063259d6dde146103935780632bbe0cae146103c357806338fff2d0146103d657600080fd5b80632143e92f14610343578063217550881461036357600080fd5b806307fca3811461027a578063084ea36e1461029c5780630a6f0ee9146102dc57806315cc481e146102fc57600080fd5b3661027557005b600080fd5b34801561028657600080fd5b5061029a61029536600461274b565b61080a565b005b3480156102a857600080fd5b506102c96102b736600461274b565b60086020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b5061029a6102f7366004612936565b61086d565b34801561030857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016102d3565b34801561034f57600080fd5b5061029a61035e3660046129c4565b61088d565b34801561036f57600080fd5b506006546103839062010000900460ff1681565b60405190151581526020016102d3565b34801561039f57600080fd5b506103836103ae36600461274b565b600d6020526000908152604090205460ff1681565b61032b6103d1366004612a20565b6108aa565b3480156103e257600080fd5b506001546102c9565b3480156103f757600080fd5b5061029a61040636600461274b565b6108cf565b34801561041757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102c9565b34801561044a57600080fd5b5060055461046690600160c01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102d3565b34801561048b57600080fd5b506102c9600c5481565b3480156104a157600080fd5b506002546102c9565b3480156104b657600080fd5b506103836104c536600461274b565b61092d565b3480156104d657600080fd5b5061029a6104e536600461274b565b61094e565b3480156104f657600080fd5b506102c960045481565b34801561050c57600080fd5b506102c960035481565b34801561052257600080fd5b5061053661053136600461274b565b6109bb565b6040516102d39190612b19565b34801561054f57600080fd5b506102c961055e366004612b9b565b600a60209081526000938452604080852082529284528284209052825290205481565b34801561058d57600080fd5b5061029a61059c366004612c25565b6109cc565b3480156105ad57600080fd5b506103836105bc36600461274b565b60096020526000908152604090205460ff1681565b3480156105dd57600080fd5b506005546104669067ffffffffffffffff1681565b3480156105fe57600080fd5b5061032b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561062657600080fd5b506006546103839060ff1681565b34801561064057600080fd5b5061065461064f366004612c91565b610d27565b6040516102d39190612cd3565b34801561066d57600080fd5b5061068161067c366004612d35565b610e1c565b6040516102d39190612e0a565b34801561069a57600080fd5b5060065461038390610100900460ff1681565b3480156106b957600080fd5b506106ee6106c8366004612e62565b600b60209081526000938452604080852082529284528284209052825290205460ff1681565b6040516102d39190612e99565b34801561070757600080fd5b5060055461046690600160801b900467ffffffffffffffff1681565b34801561072f57600080fd5b50610383610f34565b34801561074457600080fd5b506005546104669068010000000000000000900467ffffffffffffffff1681565b34801561077157600080fd5b506106ee61078036600461274b565b610f43565b34801561079157600080fd5b506107a56107a036600461274b565b610f4e565b6040516102d396959493929190612ea7565b3480156107c357600080fd5b5061029a6107d2366004612ef7565b61103b565b61029a6107e5366004612a20565b6110ad565b3480156107f657600080fd5b5061029a610805366004612f3e565b6110cb565b33610814816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916905590513381527f4ddda4f889f9f60f81c0cccbc54ac7d1eb39b079ab7f29c2a1ceda4e0187085f91015b60405180910390a25050565b6108756111c9565b61087d611214565b610888838383611250565b505050565b33610897816110fe565b6108a3858585856114c0565b5050505050565b60006108b46111c9565b6108bc611214565b6108c6838361165a565b90505b92915050565b336108d9816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916600117905590513381527fc5137efba0dae412f1520f1f5633a45f7831a93f83d0db6c31d7fc2a877b88879101610861565b6001600160a01b0381166000908152600d602052604081205460ff166108c9565b33610958816110fe565b60055461097990600160c01b900467ffffffffffffffff1662278d00612f6d565b67ffffffffffffffff1642116109a257604051637fcce2a960e01b815260040160405180910390fd5b60006109ae83306119b4565b90506108888333836119fd565b6109c36126da565b6108c982611a37565b336109d6816110fe565b6109de611b7a565b838281146109ff57604051637fcce2a960e01b815260040160405180910390fd5b60005b81811015610d1e576000858583818110610a1e57610a1e612f8e565b9050602002016020810190610a339190612fa4565b90506000888884818110610a4957610a49612f8e565b9050602002016020810190610a5e919061274b565b6001600160a01b038116600090815260076020526040812060058101549293509190846006811115610a9257610a92612ae1565b1480610aaf57506004846006811115610aad57610aad612ae1565b145b15610add5760405163f4a513b960e01b81526001600160a01b03841660048201526024015b60405180910390fd5b6001600160a01b0383166000908152600b60209081526040808320848452825280832033845290915281205460ff166006811115610b1d57610b1d612ae1565b1115610b475760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b6001600160a01b0383166000908152600b6020908152604080832084845282528083203384529091529020805485919060ff19166001836006811115610b8f57610b8f612ae1565b02179055506001600160a01b0383166000908152600a60209081526040808320848452909152812090856006811115610bca57610bca612ae1565b6006811115610bdb57610bdb612ae1565b81526020019081526020016000206000815480929190610bfa90612fbf565b90915550506004546001600160a01b0384166000908152600a60209081526040808320858452909152812090866006811115610c3857610c38612ae1565b6006811115610c4957610c49612ae1565b81526020019081526020016000205410610cca5760048201805485919060ff19166001836006811115610c7e57610c7e612ae1565b0217905550826001600160a01b03167f8d3031e5c1c3d32d10a32b857e83ec347f244057dc2dfaf266600cdc7f97c27382866000604051610cc193929190612fd8565b60405180910390a25b826001600160a01b03167f296facfa5767c7b9c26d407470403f9cd96181a04e27329e4d006a59b458c6b3828633604051610d0793929190612fd8565b60405180910390a284600101945050505050610a02565b50505050505050565b60608167ffffffffffffffff811115610d4257610d4261276f565b604051908082528060200260200182016040528015610d7557816020015b6060815260200190600190039081610d605790505b50905060005b82811015610e1557610de530858584818110610d9957610d99612f8e565b9050602002810190610dab9190613003565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bad92505050565b828281518110610df757610df7612f8e565b60200260200101819052508080610e0d90612fbf565b915050610d7b565b5092915050565b81518151606091908114610e5c576040517f7b49805600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610e7757610e7761276f565b604051908082528060200260200182016040528015610ebc57816020015b6040805180820190915260008082526020820152815260200190600190039081610e955790505b50905060005b82811015610f2b57610f06868281518110610edf57610edf612f8e565b6020026020010151868381518110610ef957610ef9612f8e565b6020026020010151611bd2565b828281518110610f1857610f18612f8e565b6020908102919091010152600101610ec2565b50949350505050565b6000610f3e611d8d565b905090565b60006108c982611dd7565b6007602090815260009182526040918290208054600182015484518086019095526002830180548652600384018054939660ff8416966101009094046001600160a01b03169594909384019190610fa49061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd09061304a565b801561101d5780601f10610ff25761010080835404028352916020019161101d565b820191906000526020600020905b81548152906001019060200180831161100057829003601f168201915b505050919092525050506004820154600590920154909160ff169086565b6110436111c9565b600081806020019051810190611059919061308e565b9050611069838260200151611dec565b8051600c556040517f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a906110a0908590859061314e565b60405180910390a1505050565b6110b56111c9565b6110bd611214565b6110c78282611f0c565b5050565b6110d36111c9565b6110dc81611fec565b80600260008282546110ee9190613167565b909155506110fb90508181565b50565b6001546040517f29e40d4b00000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ac919061317a565b6110fb5760405163075fd2b160e01b815260040160405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112125760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003611212576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061125a816110fe565b611262612016565b835160005b8181101561149757600086828151811061128357611283612f8e565b60200260200101519050600060076000836001600160a01b03166001600160a01b03168152602001908152602001600020905060006112d18360405180602001604052806000815250611bd2565b6020808201516001600160a01b038616600090815260099092526040909120549192509060ff1680611309575061130784612062565b155b80611312575080155b1561133b5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b6001546040517f068bcd8d0000000000000000000000000000000000000000000000000000000081526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d916113a89160040190815260200190565b600060405180830381865afa1580156113c5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113ed9190810190613237565b604081015160018601549192506114129161010090046001600160a01b0316846119fd565b6001600160a01b03858116600081815260096020908152604091829020805460ff19166001908117909155880154825161010090910485168152908101869052928c1690830152907fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9060600160405180910390a28560010195505050505050611267565b5060065462010000900460ff166108a3576006805462ff00001916620100001790555050505050565b8367ffffffffffffffff164211806114eb57508267ffffffffffffffff168467ffffffffffffffff16115b8061150957508167ffffffffffffffff168467ffffffffffffffff16115b8061152757508067ffffffffffffffff168267ffffffffffffffff16115b8061154557508067ffffffffffffffff168367ffffffffffffffff16115b1561156357604051637fcce2a960e01b815260040160405180910390fd5b6005805467ffffffffffffffff838116600160c01b90810277ffffffffffffffffffffffffffffffffffffffffffffffff878416600160801b908102919091166fffffffffffffffffffffffffffffffff8a8616680100000000000000009081027fffffffffffffffffffffffffffffffff000000000000000000000000000000009098168d88161797909717161791909117948590556040805186851681529486048416602086015290850483169084015290920490911660608201523360808201527fcb0fb7a7b87db2f472ee8977444cfdbc51993ce660aca27a5969a724fae6dcf39060a00160405180910390a150505050565b600061166461209d565b6000806000611686604051806040016040528060008152602001606081525090565b60065460ff16156116d857868060200190518101906116a591906132eb565b919650945090506116b68587612107565b6116d35760405163075fd2b160e01b815260040160405180910390fd5b611742565b868060200190518101906116ec91906132eb565b91955093506001600160a01b0384161515925090508161170c578561170e565b825b945081801561172457506117228587612107565b155b156117425760405163075fd2b160e01b815260040160405180910390fd5b600654610100900460ff1680156117655750602081015151158061176557508051155b1561179c576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166117ce5760405163f4a513b960e01b81526001600160a01b0386166004820152602401610ad4565b6001600160a01b038086166000908152600760209081526040909120600181018054938816610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909416939093179092558251600283019081559083015183919060038401906118419082613395565b505060065460ff1690506118555782611858565b60015b60018201805460ff191691151591909117905560058101805460009061187d90612fbf565b90915550600481015460ff16600081600681111561189d5761189d612ae1565b036118fb5760048201805460ff191660011790556040516001600160a01b038816907fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906118ee908c908c90613455565b60405180910390a26119a8565b600381600681111561190f5761190f612ae1565b03611929576004828101805460ff19169091179055611952565b600281600681111561193d5761193d612ae1565b036119525760048201805460ff191660011790555b600582015460048301546040516001600160a01b038a16927f63220f42dd2285448c45b5c8b4140e605629fd1394a1b2431a0ab0efd904e14a9261199f928e918e9160ff90911690613480565b60405180910390a25b50505050505092915050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016119ec57506001600160a01b038116316108c9565b6119f68383612243565b90506108c9565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611a2c576108888282612278565b610888838383612294565b611a3f6126da565b6001600160a01b03808316600090815260076020908152604091829020825160c08101845281548152600182015460ff8116151582850152610100900490941684840152825180840190935260028101805484526003820180549294606087019490939084019190611ab09061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611adc9061304a565b8015611b295780601f10611afe57610100808354040283529160200191611b29565b820191906000526020600020905b815481529060010190602001808311611b0c57829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611b5457611b54612ae1565b6006811115611b6557611b65612ae1565b81526020016005820154815250509050919050565b600554600160c01b900467ffffffffffffffff164211156112125760405162b828c960e81b815260040160405180910390fd5b60606108c6838360405180606001604052806027815260200161364e602791396122e3565b604080518082018252600080825260208083018290526001600160a01b03868116835260078252848320855160c08101875281548152600182015460ff811615158286015261010090049092168287015285518087019096526002810180548752600382018054969795969395929460608701949084019190611c549061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611c809061304a565b8015611ccd5780601f10611ca257610100808354040283529160200191611ccd565b820191906000526020600020905b815481529060010190602001808311611cb057829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611cf857611cf8612ae1565b6006811115611d0957611d09612ae1565b8152600591909101546020918201526001600160a01b0386166000908152600990915260408120549192509060ff16158015611d46575060035415155b15611d6a576003548251600254611d5d91906134c0565b611d6791906134d7565b90505b6040805180820182529201516001600160a01b0316825260208201529392505050565b6005546000904267ffffffffffffffff90911611801590611dc6575060055468010000000000000000900467ffffffffffffffff164211155b15611dd15750600190565b50600090565b6000611de282611a37565b6080015192915050565b611df58261235b565b80516006805460208085015161ffff1990921693151561ff0019169390931761010091151591909102179055604080517f5ab1bd5300000000000000000000000000000000000000000000000000000000815290517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692635ab1bd5392600480820193918290030181865afa158015611e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebf91906134f9565b600660036101000a8154816001600160a01b0302191690836001600160a01b0316021790555080604001516004819055506110c7816060015182608001518360a001518460c001516114c0565b60008083806020019051810190611f239190613516565b6001600160a01b038281166000908152600760209081526040808320938916835260088252808320600d909252909120549395509193509160ff16611f7b5760405163075fd2b160e01b815260040160405180910390fd5b611f8484612062565b611fac5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b611fba8382600001546123c3565b611fd757604051637fcce2a960e01b815260040160405180910390fd5b611fe481838686896123dc565b505050505050565b60065462010000900460ff16156110fb57604051637fcce2a960e01b815260040160405180910390fd5b600554600160c01b900467ffffffffffffffff164211611212576040517f8a879da200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060026001600160a01b03831660009081526007602052604090206004015460ff16600681111561209657612096612ae1565b1492915050565b6005544267ffffffffffffffff90911611806120d0575060055468010000000000000000900467ffffffffffffffff1642115b15611212576040517fb609ed5a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839263010000009091049091169063dd93da4390602401600060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261219f9190810190613544565b60065481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350630100000090910490911690635e8a791590604401602060405180830381865afa158015612217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223b919061317a565b949350505050565b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16110c75763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166122d9576390b8ec186000526004601cfd5b6000603452505050565b6060600080856001600160a01b031685604051612300919061360b565b600060405180830381855af49150503d806000811461233b576040519150601f19603f3d011682016040523d82523d6000602084013e612340565b606091505b50915091506123518683838761258d565b9695505050505050565b6123636111c9565b6001541561239d576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036123be57604051637fcce2a960e01b815260040160405180910390fd5b600155565b600c546000906123d38385613167565b11159392505050565b6123e4612606565b8160000361240557604051637fcce2a960e01b815260040160405180910390fd5b61240e83612062565b6124365760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b8185600001600082825461244a9190613167565b90915550506001600160a01b03831660009081526001860160209081526040808320546002890190925282205490916124838386613167565b905060006124a161249c83670de0b6b3a76400006134c0565b612657565b90506124ad8382613627565b905080600360008282546124c19190613167565b90915550508754819089906000906124da908490613167565b90915550506001600160a01b038716600090815260018a01602052604081208054889290612509908490613167565b90915550506001600160a01b038716600090815260028a01602052604081208054839290612538908490613167565b9091555050604080518281526001600160a01b0387811660208301528916917fe19137169fc4bceb2391a0921a61084851c12884df4897f569ec45a4ee46b7e3910160405180910390a2505050505050505050565b606083156125fc5782516000036125f5576001600160a01b0385163b6125f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad4565b508161223b565b61223b83836126b0565b60055442600160801b90910467ffffffffffffffff16118061263a5750600554600160c01b900467ffffffffffffffff1642115b156112125760405162b828c960e81b815260040160405180910390fd5b6000806002612667846001613167565b61267191906134d7565b90508291505b818110156126aa5790508060028161268f81866134d7565b6126999190613167565b6126a391906134d7565b9050612677565b50919050565b8151156126c05781518083602001fd5b8060405162461bcd60e51b8152600401610ad4919061363a565b6040518060c001604052806000815260200160001515815260200160006001600160a01b03168152602001612722604051806040016040528060008152602001606081525090565b815260200160008152602001600081525090565b6001600160a01b03811681146110fb57600080fd5b60006020828403121561275d57600080fd5b813561276881612736565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156127a8576127a861276f565b60405290565b60405160e0810167ffffffffffffffff811182821017156127a8576127a861276f565b60405160c0810167ffffffffffffffff811182821017156127a8576127a861276f565b604051601f8201601f1916810167ffffffffffffffff8111828210171561281d5761281d61276f565b604052919050565b600067ffffffffffffffff82111561283f5761283f61276f565b5060051b60200190565b600082601f83011261285a57600080fd5b8135602061286f61286a83612825565b6127f4565b82815260059290921b8401810191818101908684111561288e57600080fd5b8286015b848110156128b25780356128a581612736565b8352918301918301612892565b509695505050505050565b600067ffffffffffffffff8211156128d7576128d761276f565b50601f01601f191660200190565b600082601f8301126128f657600080fd5b813561290461286a826128bd565b81815284602083860101111561291957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561294b57600080fd5b833567ffffffffffffffff8082111561296357600080fd5b61296f87838801612849565b9450602086013591508082111561298557600080fd5b50612992868287016128e5565b92505060408401356129a381612736565b809150509250925092565b67ffffffffffffffff811681146110fb57600080fd5b600080600080608085870312156129da57600080fd5b84356129e5816129ae565b935060208501356129f5816129ae565b92506040850135612a05816129ae565b91506060850135612a15816129ae565b939692955090935050565b60008060408385031215612a3357600080fd5b823567ffffffffffffffff811115612a4a57600080fd5b612a56858286016128e5565b9250506020830135612a6781612736565b809150509250929050565b60005b83811015612a8d578181015183820152602001612a75565b50506000910152565b60008151808452612aae816020860160208601612a72565b601f01601f19169290920160200192915050565b80518252600060208201516040602085015261223b6040850182612a96565b634e487b7160e01b600052602160045260246000fd5b60078110612b1557634e487b7160e01b600052602160045260246000fd5b9052565b60208152815160208201526020820151151560408201526001600160a01b0360408301511660608201526000606083015160c06080840152612b5e60e0840182612ac2565b90506080840151612b7260a0850182612af7565b5060a084015160c08401528091505092915050565b803560078110612b9657600080fd5b919050565b600080600060608486031215612bb057600080fd5b8335612bbb81612736565b925060208401359150612bd060408501612b87565b90509250925092565b60008083601f840112612beb57600080fd5b50813567ffffffffffffffff811115612c0357600080fd5b6020830191508360208260051b8501011115612c1e57600080fd5b9250929050565b60008060008060408587031215612c3b57600080fd5b843567ffffffffffffffff80821115612c5357600080fd5b612c5f88838901612bd9565b90965094506020870135915080821115612c7857600080fd5b50612c8587828801612bd9565b95989497509550505050565b60008060208385031215612ca457600080fd5b823567ffffffffffffffff811115612cbb57600080fd5b612cc785828601612bd9565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612d2857603f19888603018452612d16858351612a96565b94509285019290850190600101612cfa565b5092979650505050505050565b60008060408385031215612d4857600080fd5b823567ffffffffffffffff80821115612d6057600080fd5b612d6c86838701612849565b9350602091508185013581811115612d8357600080fd5b8501601f81018713612d9457600080fd5b8035612da261286a82612825565b81815260059190911b82018401908481019089831115612dc157600080fd5b8584015b83811015612df957803586811115612ddd5760008081fd5b612deb8c89838901016128e5565b845250918601918601612dc5565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b82811015612e5557815180516001600160a01b03168552860151868501529284019290850190600101612e27565b5091979650505050505050565b600080600060608486031215612e7757600080fd5b8335612e8281612736565b92506020840135915060408401356129a381612736565b602081016108c98284612af7565b86815285151560208201526001600160a01b038516604082015260c060608201526000612ed760c0830186612ac2565b9050612ee66080830185612af7565b8260a0830152979650505050505050565b60008060408385031215612f0a57600080fd5b82359150602083013567ffffffffffffffff811115612f2857600080fd5b612f34858286016128e5565b9150509250929050565b600060208284031215612f5057600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115610e1557610e15612f57565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612fb657600080fd5b6108c682612b87565b600060018201612fd157612fd1612f57565b5060010190565b83815260608101612fec6020830185612af7565b6001600160a01b0383166040830152949350505050565b6000808335601e1984360301811261301a57600080fd5b83018035915067ffffffffffffffff82111561303557600080fd5b602001915036819003821315612c1e57600080fd5b600181811c9082168061305e57607f821691505b6020821081036126aa57634e487b7160e01b600052602260045260246000fd5b80518015158114612b9657600080fd5b60008183036101008112156130a257600080fd5b6130aa612785565b8351815260e0601f19830112156130c057600080fd5b6130c86127ae565b91506130d66020850161307e565b82526130e46040850161307e565b6020830152606084015160408301526080840151613101816129ae565b606083015260a0840151613114816129ae565b608083015260c0840151613127816129ae565b60a083015260e084015161313a816129ae565b60c083015260208101919091529392505050565b82815260406020820152600061223b6040830184612a96565b808201808211156108c9576108c9612f57565b60006020828403121561318c57600080fd5b6108c68261307e565b8051612b9681612736565b600082601f8301126131b157600080fd5b81516131bf61286a826128bd565b8181528460208386010111156131d457600080fd5b61223b826020830160208701612a72565b6000604082840312156131f757600080fd5b6131ff612785565b905081518152602082015167ffffffffffffffff81111561321f57600080fd5b61322b848285016131a0565b60208301525092915050565b60006020828403121561324957600080fd5b815167ffffffffffffffff8082111561326157600080fd5b9083019060c0828603121561327557600080fd5b61327d6127d1565b82518152602083015161328f81612736565b602082015260408301516132a281612736565b60408201526060830151828111156132b957600080fd5b6132c5878286016131e5565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b60008060006060848603121561330057600080fd5b835161330b81612736565b602085015190935061331c81612736565b604085015190925067ffffffffffffffff81111561333957600080fd5b613345868287016131e5565b9150509250925092565b601f82111561088857600081815260208120601f850160051c810160208610156133765750805b601f850160051c820191505b81811015611fe457828155600101613382565b815167ffffffffffffffff8111156133af576133af61276f565b6133c3816133bd845461304a565b8461334f565b602080601f8311600181146133f857600084156133e05750858301515b600019600386901b1c1916600185901b178555611fe4565b600085815260208120601f198616915b8281101561342757888601518255948401946001909101908401613408565b50858210156134455787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006134686040830185612a96565b90506001600160a01b03831660208301529392505050565b8481526080602082015260006134996080830186612a96565b90506001600160a01b03841660408301526134b76060830184612af7565b95945050505050565b80820281158282048414176108c9576108c9612f57565b6000826134f457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561350b57600080fd5b815161276881612736565b6000806040838503121561352957600080fd5b825161353481612736565b6020939093015192949293505050565b60006020828403121561355657600080fd5b815167ffffffffffffffff8082111561356e57600080fd5b9083019060c0828603121561358257600080fd5b61358a6127d1565b82518152602083015160208201526040830151828111156135aa57600080fd5b6135b6878286016131a0565b6040830152506060830151828111156135ce57600080fd5b6135da878286016131e5565b6060830152506135ec60808401613195565b60808201526135fd60a08401613195565b60a082015295945050505050565b6000825161361d818460208701612a72565b9190910192915050565b818103818111156108c9576108c9612f57565b6020815260006108c66020830184612a9656fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f15b0c2d6e8bec4e4fd5e22a5042b1673d24fb24a00e3edc2f6640bec04867c464736f6c63430008130033"; diff --git a/dist/strategies/RFPSimpleStrategy/types.d.ts b/dist/strategies/RFPSimpleStrategy/types.d.ts new file mode 100644 index 0000000..b9e68d7 --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/types.d.ts @@ -0,0 +1,19 @@ +import { Metadata } from "../../types"; +import { Status } from "../types"; +export type InitializeParams = { + maxBid: bigint; + useRegistryAnchor: boolean; + metadataRequired: boolean; +}; +export type Recipient = { + useRegistryAnchor: boolean; + recipientAddress: string; + proposalBid: bigint; + recipientStatus: Status; + metadata: Metadata; +}; +export type Milestone = { + amountPercentage: bigint; + metadata: Metadata; + milestoneStatus: Status; +}; diff --git a/dist/strategies/RFPSimpleStrategy/types.js b/dist/strategies/RFPSimpleStrategy/types.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/dist/strategies/RFPSimpleStrategy/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/index.ts b/src/index.ts index a4fd9f7..d0bb9b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,8 @@ import { MicroGrantsStrategy } from "./strategies/MicroGrantsStrategy/MicroGrant import { SQFSuperFluidStrategy } from "./strategies/SuperFluidStrategy/SQFSuperFluidStrategy"; import { DonationVotingMerkleDistributionStrategy } from "./strategies/DonationVotingMerkleDistributionStrategy/DonationVotingMerkleDistribution"; import { DirectGrantsStrategy } from "./strategies/DirectGrants/DirectGrantsStrategy"; +import { QVSimpleStrategy } from "./strategies/QVSimpleStrategy/QVSimpleStrategy"; +import { RFPSimpleStrategy } from "./strategies/RFPSimpleStrategy/RFPSimpleStrategy"; export * from "./types"; export * from "./strategies/types"; @@ -13,6 +15,8 @@ export * as DonationVotingMerkleDistributionStrategyTypes from "./strategies/Don export * as MicroGrantsStrategyTypes from "./strategies/MicroGrantsStrategy/types"; export * as SQFSuperFluidStrategyTypes from "./strategies/SuperFluidStrategy/types"; export * as DirectGrantsStrategyTypes from "./strategies/DirectGrants/types"; +export * as QVSimpleStrategyTypes from "./strategies/QVSimpleStrategy/types"; +export * as RFPSimpleStrategyTypes from "./strategies/RFPSimpleStrategy/types"; export { abi as AlloAbi } from "./Allo/allo.config"; export { abi as RegistryAbi } from "./Registry/registry.config"; @@ -21,6 +25,8 @@ export { abi as DonationVotingMerkleDistributionVaultStrategyAbi } from "./strat export { abi as MicroGrantsStrategyAbi } from "./strategies/MicroGrantsStrategy/microGrants.config"; export { abi as SQFSuperFluidStrategyAbi } from "./strategies/SuperFluidStrategy/superfluid.config"; export { abi as DirectGrantsStrategyAbi } from "./strategies/DirectGrants/directGrants.config"; +export { abi as QVSimpleStrategyAbi } from "./strategies/QVSimpleStrategy/qvSimple.config"; +export { abi as RFPSimpleStrategyAbi } from "./strategies/RFPSimpleStrategy/rfpSimple.config"; export { Allo, @@ -29,4 +35,6 @@ export { SQFSuperFluidStrategy, DonationVotingMerkleDistributionStrategy, DirectGrantsStrategy, + QVSimpleStrategy, + RFPSimpleStrategy, }; diff --git a/src/strategies/QVSimpleStrategy/QVSimpleStrategy.ts b/src/strategies/QVSimpleStrategy/QVSimpleStrategy.ts new file mode 100644 index 0000000..9eedbe1 --- /dev/null +++ b/src/strategies/QVSimpleStrategy/QVSimpleStrategy.ts @@ -0,0 +1,134 @@ +import { + PublicClient, + Transport, + Chain, + extractChain, + getContract, + encodeAbiParameters, + parseAbiParameters, +} from "viem"; +import { Allo } from "../../Allo/Allo"; +import { ConstructorArgs, DeployParams } from "../../types"; +import { supportedChains } from "../../chains.config"; +import { create } from "../../Client/Client"; +import { InitializeParamsSimple } from "./types"; +import { + abi as qvSimpleStrategyAbi, + bytecode as qvSimpleStrategyBytecode, +} from "./qvSimple.config"; + +export class QVSimpleStrategy { + private client: PublicClient; + + private contract: any; + + private strategy: `0x${string}` | undefined; + + private poolId: bigint; + + private allo: Allo; + + constructor({ chain, rpc, address, poolId }: ConstructorArgs) { + const usedChain = extractChain({ + chains: supportedChains, + id: chain as any, + }); + + this.client = create(usedChain, rpc); + + this.allo = new Allo({ chain, rpc }); + + if (address) { + this.contract = getContract({ + address: address, + abi: [], + publicClient: this.client, + }); + this.strategy = address; + } + + this.poolId = poolId || BigInt(-1); + } + + public getInitializeData(params: InitializeParamsSimple): `0x${string}` { + const encoded: `0x${string}` = encodeAbiParameters( + parseAbiParameters( + "uint256, (bool, bool, uint256, uint64, uint64, uint64, uint64)" + ), + [ + params.maxVoiceCreditsPerAllocator, + [ + params.params.registryGating, + params.params.metadataRequired, + params.params.reviewThreshold, + params.params.registrationStartTime, + params.params.registrationEndTime, + params.params.allocationStartTime, + params.params.allocationEndTime, + ], + ] + ); + + return encoded; + } + + public getDeployParams(): DeployParams { + const constructorArgs: `0x${string}` = encodeAbiParameters( + parseAbiParameters("address, string"), + [this.allo.address(), "QVSimpleStrategy1.0"] + ); + const constructorArgsNo0x = constructorArgs.slice(2); + + return { + abi: qvSimpleStrategyAbi, + bytecode: (qvSimpleStrategyBytecode + + constructorArgsNo0x) as unknown as `0x${string}`, + }; + } + + public async setPoolId(poolId: bigint): Promise { + this.poolId = poolId; + const strategyAddress = await this.allo.getStrategy(poolId); + + this.setContract(strategyAddress as `0x${string}`); + } + + public setContract(address: `0x${string}`): void { + this.contract = getContract({ + address: address, + abi: qvSimpleStrategyAbi, + publicClient: this.client, + }); + + this.strategy = address; + } + + private checkPoolId(): void { + if (this.poolId === BigInt(-1)) + throw new Error( + "QVSimpleStrategy: No poolId provided. Please call `setPoolId` first." + ); + } + + private checkStrategy(): void { + if (!this.strategy) + throw new Error( + "QVSimpleStrategy: No strategy address provided. Please call `setContract` first." + ); + } + + public async getNative(): Promise { + this.checkStrategy(); + const native = await this.contract.read.NATIVE(); + + return native; + } + + public async getMetadataRequired(): Promise { + this.checkStrategy(); + + const required: boolean = await this.contract.read.metadataRequired(); + + return required; + } +} diff --git a/src/strategies/QVSimpleStrategy/README.md b/src/strategies/QVSimpleStrategy/README.md new file mode 100644 index 0000000..b8b34fd --- /dev/null +++ b/src/strategies/QVSimpleStrategy/README.md @@ -0,0 +1,62 @@ +# Quadratic Voting Simple Strategy + +This strategy is a simple implementation of Quadratic Voting. + +## Table of Contents + +- [Quadratic Voting Simple Strategy](#quadratic-voting-simple-strategy) + - [Table of Contents](#table-of-contents) + - [Initialization](#initialization) + - [Creating a Quadratic Voting Instance](#creating-a-quadratic-voting-instance) + +## Initialization + +### Creating a Quadratic Voting Instance + +```javascript +import { QVSimpleStrategy } from "@allo-team/allo-v2-sdk/"; + +const strategy = new QVSimpleStrategy({ + chain: 1, + poolId: 1, +}); +``` +### Setting Pool ID and Strategy Contract + +To perform operations that require a specific pool and strategy contract, set the pool ID and strategy contract address: + +```javascript +const poolId = 1; +const strategyAddress = "0xYourStrategyContractAddress"; + +await strategy.setPoolId(poolId); + +strategy.setContract(strategyAddress); +``` + +## Read-Only Functions + +### Get Native Token Address + +Retrieve the native token address used in the strategy: + +```javascript +const nativeToken = await strategy.getNative(); + +console.log(`Native Token Address: ${nativeToken}`); +``` + +### Deploy Parameters + +Generate deployment parameters for deploying a new strategy: + +```javascript +const deployParams = strategy.getDeployParams(); + +// Client could be from ethers, viem, etc. +const hash = await walletClient!.deployContract({ + abi: deployParams.abi, + bytecode: deployParams.bytecode as `0x${string}`, + args: [], +}); +``` \ No newline at end of file diff --git a/src/strategies/QVSimpleStrategy/qvSimple.config.ts b/src/strategies/QVSimpleStrategy/qvSimple.config.ts new file mode 100644 index 0000000..9860684 --- /dev/null +++ b/src/strategies/QVSimpleStrategy/qvSimple.config.ts @@ -0,0 +1,725 @@ +export const abi = [ + { + type: "constructor", + inputs: [ + { name: "_allo", type: "address", internalType: "address" }, + { name: "_name", type: "string", internalType: "string" }, + ], + stateMutability: "nonpayable", + }, + { type: "receive", stateMutability: "payable" }, + { + type: "function", + name: "NATIVE", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "addAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allocate", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "allocationEndTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocationStartTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocators", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [ + { name: "voiceCredits", type: "uint256", internalType: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "allowedAllocators", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "distribute", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "distributionStarted", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "getAllo", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IAllo" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPayouts", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes[]", internalType: "bytes[]" }, + ], + outputs: [ + { + name: "", + type: "tuple[]", + internalType: "struct IStrategy.PayoutSummary[]", + components: [ + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "amount", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolAmount", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolId", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipient", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct QVBaseStrategy.Recipient", + components: [ + { + name: "totalVotesReceived", + type: "uint256", + internalType: "uint256", + }, + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { name: "applicationId", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipientStatus", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getStrategyId", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + name: "increasePoolAmount", + inputs: [{ name: "_amount", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "initialize", + inputs: [ + { name: "_poolId", type: "uint256", internalType: "uint256" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isPoolActive", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isValidAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "maxVoiceCreditsPerAllocator", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "metadataRequired", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "multicall", + inputs: [{ name: "data", type: "bytes[]", internalType: "bytes[]" }], + outputs: [{ name: "results", type: "bytes[]", internalType: "bytes[]" }], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "paidOut", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "recipients", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [ + { name: "totalVotesReceived", type: "uint256", internalType: "uint256" }, + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { name: "recipientAddress", type: "address", internalType: "address" }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { name: "applicationId", type: "uint256", internalType: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "registerRecipient", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "recipientId", type: "address", internalType: "address" }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "registrationEndTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "registrationStartTime", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "registryGating", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "removeAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "reviewRecipients", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { + name: "_recipientStatuses", + type: "uint8[]", + internalType: "enum IStrategy.Status[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "reviewThreshold", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "reviewedByManager", + inputs: [ + { name: "", type: "address", internalType: "address" }, + { name: "", type: "uint256", internalType: "uint256" }, + { name: "", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "reviewsByStatus", + inputs: [ + { name: "", type: "address", internalType: "address" }, + { name: "", type: "uint256", internalType: "uint256" }, + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "totalRecipientVotes", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "updatePoolTimestamps", + inputs: [ + { + name: "_registrationStartTime", + type: "uint64", + internalType: "uint64", + }, + { name: "_registrationEndTime", type: "uint64", internalType: "uint64" }, + { name: "_allocationStartTime", type: "uint64", internalType: "uint64" }, + { name: "_allocationEndTime", type: "uint64", internalType: "uint64" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [{ name: "_token", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "votes", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "allocator", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "token", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllocatorAdded", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllocatorRemoved", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Distributed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "recipientAddress", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "poolId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + ], + anonymous: false, + }, + { + type: "event", + name: "PoolActive", + inputs: [ + { name: "active", type: "bool", indexed: false, internalType: "bool" }, + ], + anonymous: false, + }, + { + type: "event", + name: "RecipientStatusUpdated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Registered", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Reviewed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TimestampsUpdated", + inputs: [ + { + name: "registrationStartTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "registrationEndTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "allocationStartTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "allocationEndTime", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdatedRegistration", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "applicationId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + ], + anonymous: false, + }, + { type: "error", name: "ALLOCATION_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ENDED", inputs: [] }, + { type: "error", name: "ALREADY_INITIALIZED", inputs: [] }, + { type: "error", name: "AMOUNT_MISMATCH", inputs: [] }, + { type: "error", name: "ANCHOR_ERROR", inputs: [] }, + { type: "error", name: "ARRAY_MISMATCH", inputs: [] }, + { type: "error", name: "EXCESS_AMOUNT_SENT", inputs: [] }, + { type: "error", name: "INVALID", inputs: [] }, + { type: "error", name: "INVALID_ADDRESS", inputs: [] }, + { type: "error", name: "INVALID_FEE", inputs: [] }, + { type: "error", name: "INVALID_METADATA", inputs: [] }, + { type: "error", name: "INVALID_REGISTRATION", inputs: [] }, + { type: "error", name: "IS_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "MISMATCH", inputs: [] }, + { type: "error", name: "NONCE_NOT_AVAILABLE", inputs: [] }, + { type: "error", name: "NON_ZERO_VALUE", inputs: [] }, + { type: "error", name: "NOT_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "NOT_ENOUGH_FUNDS", inputs: [] }, + { type: "error", name: "NOT_IMPLEMENTED", inputs: [] }, + { type: "error", name: "NOT_INITIALIZED", inputs: [] }, + { type: "error", name: "NOT_PENDING_OWNER", inputs: [] }, + { type: "error", name: "POOL_ACTIVE", inputs: [] }, + { type: "error", name: "POOL_INACTIVE", inputs: [] }, + { type: "error", name: "RECIPIENT_ALREADY_ACCEPTED", inputs: [] }, + { + type: "error", + name: "RECIPIENT_ERROR", + inputs: [{ name: "recipientId", type: "address", internalType: "address" }], + }, + { type: "error", name: "RECIPIENT_NOT_ACCEPTED", inputs: [] }, + { type: "error", name: "REGISTRATION_ACTIVE", inputs: [] }, + { type: "error", name: "REGISTRATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "UNAUTHORIZED", inputs: [] }, + { type: "error", name: "ZERO_ADDRESS", inputs: [] }, +] as const; + +export const bytecode = + "0x60c06040523480156200001157600080fd5b5060405162003358380380620033588339810160408190526200003491620000bf565b6001600160a01b03821660805260405182908290620000589082906020016200019a565b60408051601f19818403018152919052805160209091012060a0525050600160035550620001cf9050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b65781810151838201526020016200009c565b50506000910152565b60008060408385031215620000d357600080fd5b82516001600160a01b0381168114620000eb57600080fd5b60208401519092506001600160401b03808211156200010957600080fd5b818501915085601f8301126200011e57600080fd5b81518181111562000133576200013362000083565b604051601f8201601f19908116603f011681019083821181831017156200015e576200015e62000083565b816040528281528860208487010111156200017857600080fd5b6200018b83602083016020880162000099565b80955050505050509250929050565b6020815260008251806020840152620001bb81604085016020870162000099565b601f01601f19169190910160400192915050565b60805160a0516131396200021f60003960006102ce01526000818161020301528181610e6101528181610f30015281816115ba015281816116d701528181611d3a0152611f2a01526131396000f3fe6080604052600436106101c65760003560e01c806374b11d8a116100f7578063cb0e85a611610095578063eb11af9311610064578063eb11af9314610558578063edd146cc14610578578063ef2920fc14610598578063f5b0dfb7146105ab57600080fd5b8063cb0e85a6146104c5578063de1acc5c146104e4578063df868ed314610511578063e89e4ed61461052957600080fd5b8063b2b878d0116100d1578063b2b878d014610438578063b5f620ce14610465578063b9d7040b14610485578063caaed302146104a557600080fd5b806374b11d8a146103da5780639243b605146103f0578063a0cf0aea1461041057600080fd5b806343984ddb1161016457806351cff8d91161013e57806351cff8d91461034d5780635586ba331461036d578063570897391461039357806362812a39146103ad57600080fd5b806343984ddb146102f25780634ab4ba42146103085780634d31d0871461031d57600080fd5b80632bbe0cae116101a05780632bbe0cae1461026d578063369dc5b51461028057806338fff2d0146102a057806342fda9c7146102bf57600080fd5b80630a6f0ee9146101d257806315cc481e146101f45780632442e1cb1461024057600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed3660046124d9565b6105cb565b005b34801561020057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024c57600080fd5b5061026061025b366004612551565b6105eb565b6040516102379190612611565b61022361027b366004612653565b610711565b34801561028c57600080fd5b506101f261029b366004612551565b610736565b3480156102ac57600080fd5b506001545b604051908152602001610237565b3480156102cb57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102b1565b3480156102fe57600080fd5b506102b160075481565b34801561031457600080fd5b506002546102b1565b34801561032957600080fd5b5061033d6103383660046126a5565b61074d565b6040519015158152602001610237565b34801561035957600080fd5b506101f26103683660046126a5565b610758565b34801561037957600080fd5b50600454610223906201000090046001600160a01b031681565b34801561039f57600080fd5b5060045461033d9060ff1681565b3480156103b957600080fd5b506103cd6103c83660046126a5565b610783565b60405161023791906126c2565b3480156103e657600080fd5b506102b160065481565b3480156103fc57600080fd5b506101f261040b366004612719565b610794565b34801561041c57600080fd5b5061022373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561044457600080fd5b50610458610453366004612754565b610894565b6040516102379190612829565b34801561047157600080fd5b506101f261048036600461288f565b61092b565b34801561049157600080fd5b506101f26104a03660046128bb565b61093e565b3480156104b157600080fd5b506101f26104c0366004612551565b610b74565b3480156104d157600080fd5b5060045461033d90610100900460ff1681565b3480156104f057600080fd5b506105046104ff366004612551565b610c93565b6040516102379190612a0b565b34801561051d57600080fd5b5060005460ff1661033d565b34801561053557600080fd5b50610549610544366004612551565b610cc5565b60405161023793929190612a19565b34801561056457600080fd5b506105046105733660046126a5565b610da7565b34801561058457600080fd5b506101f2610593366004612a41565b610db2565b6101f26105a6366004612653565b610e12565b3480156105b757600080fd5b506101f26105c6366004612551565b610e2c565b6105d3610e56565b6105db610ea1565b6105e6838383610edd565b505050565b6105f36121ca565b6009828154811061060657610606612a88565b906000526020600020906004020160405180606001604052908160008201548152602001600182016040518060400160405290816000820154815260200160018201805461065390612a9e565b80601f016020809104026020016040519081016040528092919081815260200182805461067f90612a9e565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050919092525050508152600382015460209091019060ff1660068111156106f7576106f76125d9565b6006811115610708576107086125d9565b90525092915050565b600061071b610e56565b610723610ea1565b61072d8383611261565b90505b92915050565b3361074081611590565b61074982611642565b5050565b6000610730826116ba565b3361076281611590565b61076a61175f565b6000610776833061179c565b90506105e68333836117e5565b61078b612206565b6107308261181f565b6004546201000090046001600160a01b031633148015906107ce57506004546107cc906201000090046001600160a01b0316336119eb565b155b156107ec5760405163075fd2b160e01b815260040160405180910390fd5b6009546007541061081057604051632f1f68e160e11b815260040160405180910390fd5b600060096007548154811061082757610827612a88565b90600052602060002090600402019050818160010181816108489190612b26565b505060038101805460ff191660011790556007546040519081527fb8cc7b45ad9f94af049eb207914f37551e7d5c06a10c7fe73df91bbfc1643412906020015b60405180910390a15050565b60408051600180825281830190925260609160009190816020015b60408051808201909152600080825260208201528152602001906001900390816108af579050509050610906600460029054906101000a90046001600160a01b031660405180602001604052806000815250611b15565b8160008151811061091957610919612a88565b60209081029190910101529392505050565b3361093581611590565b61074982611c82565b3361094881611590565b600954156109d1576000600960008154811061096657610966612a88565b600091825260209091206003600490920201015460ff16600681111561098e5761098e6125d9565b146109c5576040517fb9463a6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109d16009600061224a565b8151600090815b81811015610b125760008582815181106109f4576109f4612a88565b602002602001015160000151905080600003610a2357604051632f1f68e160e11b815260040160405180910390fd5b610a2d8185612c35565b93506000868381518110610a4357610a43612a88565b6020026020010151604001906006811115610a6057610a606125d9565b90816006811115610a7357610a736125d9565b815250506009868381518110610a8b57610a8b612a88565b60209081029190910181015182546001818101855560009485529383902082516004909202019081558183015180519482019485559283015191939092916002840190610ad89082612c48565b505050604082015160038201805460ff19166001836006811115610afe57610afe6125d9565b021790555050600190920191506109d89050565b5081670de0b6b3a764000014610b3b57604051632f1f68e160e11b815260040160405180910390fd5b6040518181527f5d89f885f30c3150c167b2c31128bdf9a126180d134fa1d434f7edceae2881189060200160405180910390a150505050565b33610b7e81611590565b600160098381548110610b9357610b93612a88565b600091825260209091206003600490920201015460ff166006811115610bbb57610bbb6125d9565b14610bf2576040517f0abee44c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360098381548110610c0757610c07612a88565b60009182526020909120600360049092020101805460ff19166001836006811115610c3457610c346125d9565b02179055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e7008260098481548110610c6e57610c6e612a88565b6000918252602090912060036004909202010154604051610888929160ff1690612d08565b600060098281548110610ca857610ca8612a88565b600091825260209091206003600490920201015460ff1692915050565b60098181548110610cd557600080fd5b90600052602060002090600402016000915090508060000154908060010160405180604001604052908160008201548152602001600182018054610d1890612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4490612a9e565b8015610d915780601f10610d6657610100808354040283529160200191610d91565b820191906000526020600020905b815481529060010190602001808311610d7457829003601f168201915b5050509190925250505060039091015460ff1683565b600061073082611cc3565b600081806020019051810190610dc89190612d1c565b9050610dd48382611cd8565b7f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a8383604051610e05929190612d67565b60405180910390a1505050565b610e1a610e56565b610e22610ea1565b6107498282611df0565b610e34610e56565b8060026000828254610e469190612c35565b90915550610e5390508181565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610e9f5760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003610e9f576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee561175f565b80610eef81611590565b60095460075410610f1357604051632f1f68e160e11b815260040160405180910390fd5b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91610f679160040190815260200190565b600060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fac9190810190612e22565b90506000600960075481548110610fc557610fc5612a88565b60009182526020808320600480546201000090046001600160a01b039081168652600a84526040808720815160a081018352815460ff8082161515835261010090910490941696810196909652600181015491860191909152600281015495909202909201955091926060840191166006811115611045576110456125d9565b6006811115611056576110566125d9565b8152602001600382016040518060400160405290816000820154815260200160018201805461108490612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546110b090612a9e565b80156110fd5780601f106110d2576101008083540402835291602001916110fd565b820191906000526020600020905b8154815290600101906020018083116110e057829003601f168201915b5050509190925250505090525090506001600383015460ff166006811115611127576111276125d9565b1461114557604051632f1f68e160e11b815260040160405180910390fd5b6000670de0b6b3a7640000836000015483604001516111649190612ed6565b61116e9190612eed565b905080600260008282546111829190612f0f565b9250508190555061119c84604001518360200151836117e5565b60038301805460ff19166002179055600780549060006111bb83612f22565b91905055507fe6971e1fa5069ef0ac111c9a8c3c6ae90667ddd05771ece6c5f0dfd64fc3e70060075460026040516111f4929190612d08565b60405180910390a1600454602083810151604080516001600160a01b03928316815292830185905289821683820152516201000090930416917fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9181900360600190a25050505050505050565b600061126b612013565b60008060008061128e604051806040016040528060008152602001606081525090565b878060200190518101906112a29190612f3b565b600454929750929550935090915060ff16806112c657506001600160a01b03831615155b9450846112d357866112d5565b825b95508480156112eb57506112e986886119eb565b155b156113095760405163075fd2b160e01b815260040160405180910390fd5b600454610100900460ff16801561132c5750602081015151158061132c57508051155b15611363576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065482111561139f576040517faf55723000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036113ad5760065491505b6001600160a01b0384166113e45760405163f4a513b960e01b81526001600160a01b03871660048201526024015b60405180910390fd5b6001600160a01b0386166000908152600a6020526040812090600282015460ff166006811115611416576114166125d9565b036114b557600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0389169081179091556040517fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906114a8908c908c90612fa9565b60405180910390a26114f9565b866001600160a01b03167faf5977db3aa7e6fc7d05e21c791ebd214afa76da27c8d8ddc8e4a9f742d7b2368a8a6040516114f0929190612fa9565b60405180910390a25b80547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038716021781558561153d57805460ff16611540565b60015b815460ff191690151517815560018101839055815160038201908155602083015183919060048401906115739082612c48565b505050600201805460ff1916600117905550939695505050505050565b6001546040516329e40d4b60e01b815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116259190612fd4565b610e535760405163075fd2b160e01b815260040160405180910390fd5b60065481101561167e576040517ff96c278800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60068190556040518181527fbe1bfc6b02716ac59d6f9a0b32d161252bb03558ca6b238dbc66752cef8d2bb6906020015b60405180910390a150565b6001546040516329e40d4b60e01b81526000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916329e40d4b9161171e9186906004019182526001600160a01b0316602082015260400190565b602060405180830381865afa15801561173b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107309190612fd4565b60005460ff1615610e9f576040517fb186267000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016117d457506001600160a01b03811631610730565b6117de838361204f565b9050610730565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611814576105e68282612084565b6105e68383836120a0565b611827612206565b6001600160a01b038083166000908152600a6020908152604091829020825160a081018452815460ff8082161515835261010090910490951692810192909252600181015492820192909252600282015490926060840191166006811115611891576118916125d9565b60068111156118a2576118a26125d9565b815260200160038201604051806040016040529081600082015481526020016001820180546118d090612a9e565b80601f01602080910402602001604051908101604052809291908181526020018280546118fc90612a9e565b80156119495780601f1061191e57610100808354040283529160200191611949565b820191906000526020600020905b81548152906001019060200180831161192c57829003601f168201915b505050919092525050509052506004549091506201000090046001600160a01b03161580159061198d57506004546001600160a01b03838116620100009092041614155b156119e6576000816060015160068111156119aa576119aa6125d9565b116119b65760006119b9565b60035b816060019060068111156119cf576119cf6125d9565b908160068111156119e2576119e26125d9565b9052505b919050565b6005546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839291169063dd93da4390602401600060405180830381865afa158015611a52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a7a9190810190612ff1565b60055481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350911690635e8a791590604401602060405180830381865afa158015611ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0d9190612fd4565b949350505050565b604080518082018252600080825260208083018290526001600160a01b038681168352600a8252848320855160a081018752815460ff80821615158352610100909104909316938101939093526001810154958301959095526002850154939492939192916060840191166006811115611b9157611b916125d9565b6006811115611ba257611ba26125d9565b81526020016003820160405180604001604052908160008201548152602001600182018054611bd090612a9e565b80601f0160208091040260200160405190810160405280929190818152602001828054611bfc90612a9e565b8015611c495780601f10611c1e57610100808354040283529160200191611c49565b820191906000526020600020905b815481529060010190602001808311611c2c57829003601f168201915b505050919092525050509052506040805180820182526020808401516001600160a01b0316825291909201519082015291505092915050565b6000805460ff19168215159081179091556040519081527fd94c9bc4d43c51d8dc345a016d8e3d994432fac68e72832e4cf3a616bd8efae0906020016116af565b6000611cce8261181f565b6060015192915050565b611ce1826120ef565b6020818101516004805460408086015161ffff1990921693151561ff001916939093176101009115159190910217815581517f5ab1bd5300000000000000000000000000000000000000000000000000000000815291517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693635ab1bd539380840193919291908290030181865afa158015611d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dae91906130b8565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790558051611de690611642565b6107496001611c82565b611df8612157565b611e00612013565b80611e0a81611590565b600083806020019051810190611e2091906130d5565b600480547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b039485168102919091179182905590049091166000818152600a602052604090209192501580611e9a57506001600282015460ff166006811115611e9757611e976125d9565b14155b15611ecf576004805460405163f4a513b960e01b8152620100009091046001600160a01b0316918101919091526024016113db565b6002818101805460ff1916909117905560018101548214611f0357604051637fcce2a960e01b815260040160405180910390fd5b611f0d6000611c82565b60015460405163068bcd8d60e01b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d91611f619160040190815260200190565b600060405180830381865afa158015611f7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fa69190810190612e22565b60045460408281015181518781526001600160a01b03918216602082015289821681840152915193945062010000909204909116917f463ffc2cf8b1596445c417388ed30e53eb67cf6668cb2be7f0addf8a78c8441b9181900360600190a2505050506107496001600355565b60005460ff16610e9f576040517fcfe7975b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16107495763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166120e5576390b8ec186000526004601cfd5b6000603452505050565b6120f7610e56565b60015415612131576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000361215257604051637fcce2a960e01b815260040160405180910390fd5b600155565b6002600354036121c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016113db565b6002600355565b6040518060600160405280600081526020016121f9604051806040016040528060008152602001606081525090565b815260200160005b905290565b6040805160a0810182526000808252602082018190529181018290529060608201908152602001612201604051806040016040528060008152602001606081525090565b5080546000825560040290600052602060002090810190610e5391905b808211156122a0576000808255600182018181558161228960028501826122a4565b50505060038101805460ff19169055600401612267565b5090565b5080546122b090612a9e565b6000825580601f106122c0575050565b601f016020900490600052602060002090810190610e5391905b808211156122a057600081556001016122da565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715612327576123276122ee565b60405290565b6040805190810167ffffffffffffffff81118282101715612327576123276122ee565b60405160c0810167ffffffffffffffff81118282101715612327576123276122ee565b604051601f8201601f1916810167ffffffffffffffff8111828210171561239c5761239c6122ee565b604052919050565b600067ffffffffffffffff8211156123be576123be6122ee565b5060051b60200190565b6001600160a01b0381168114610e5357600080fd5b600082601f8301126123ee57600080fd5b813560206124036123fe836123a4565b612373565b82815260059290921b8401810191818101908684111561242257600080fd5b8286015b84811015612446578035612439816123c8565b8352918301918301612426565b509695505050505050565b600067ffffffffffffffff82111561246b5761246b6122ee565b50601f01601f191660200190565b60006124876123fe84612451565b905082815283838301111561249b57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126124c357600080fd5b6124d283833560208501612479565b9392505050565b6000806000606084860312156124ee57600080fd5b833567ffffffffffffffff8082111561250657600080fd5b612512878388016123dd565b9450602086013591508082111561252857600080fd5b50612535868287016124b2565b9250506040840135612546816123c8565b809150509250925092565b60006020828403121561256357600080fd5b5035919050565b60005b8381101561258557818101518382015260200161256d565b50506000910152565b600081518084526125a681602086016020860161256a565b601f01601f19169290920160200192915050565b805182526000602082015160406020850152611b0d604085018261258e565b634e487b7160e01b600052602160045260246000fd5b6007811061260d57634e487b7160e01b600052602160045260246000fd5b9052565b6020815281516020820152600060208301516060604084015261263760808401826125ba565b9050604084015161264b60608501826125ef565b509392505050565b6000806040838503121561266657600080fd5b823567ffffffffffffffff81111561267d57600080fd5b612689858286016124b2565b925050602083013561269a816123c8565b809150509250929050565b6000602082840312156126b757600080fd5b81356124d2816123c8565b602081528151151560208201526001600160a01b036020830151166040820152604082015160608201526000606083015161270060808401826125ef565b50608083015160a080840152611b0d60c08401826125ba565b60006020828403121561272b57600080fd5b813567ffffffffffffffff81111561274257600080fd5b8201604081850312156124d257600080fd5b6000806040838503121561276757600080fd5b823567ffffffffffffffff8082111561277f57600080fd5b61278b868387016123dd565b93506020915081850135818111156127a257600080fd5b8501601f810187136127b357600080fd5b80356127c16123fe826123a4565b81815260059190911b820184019084810190898311156127e057600080fd5b8584015b83811015612818578035868111156127fc5760008081fd5b61280a8c89838901016124b2565b8452509186019186016127e4565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561287457815180516001600160a01b03168552860151868501529284019290850190600101612846565b5091979650505050505050565b8015158114610e5357600080fd5b6000602082840312156128a157600080fd5b81356124d281612881565b8035600781106119e657600080fd5b6000602082840312156128cd57600080fd5b67ffffffffffffffff80833511156128e457600080fd5b8235830184601f8201126128f757600080fd5b6129046123fe82356123a4565b81358082526020808301929160051b8401018781111561292357600080fd5b602084015b818110156129fe57858135111561293e57600080fd5b80358501601f196060828c038201121561295757600080fd5b61295f612304565b6020830135815260408301358981111561297857600080fd5b83016040818e038401121561298c57600080fd5b61299461232d565b92506020810135835260408101358a8111156129af57600080fd5b01603f81018d136129bf57600080fd5b6129d18d602083013560408401612479565b6020840152508160208201526129e9606084016128ac565b60408201528652505060209384019301612928565b5090979650505050505050565b6020810161073082846125ef565b838152606060208201526000612a3260608301856125ba565b9050611b0d60408301846125ef565b60008060408385031215612a5457600080fd5b82359150602083013567ffffffffffffffff811115612a7257600080fd5b612a7e858286016124b2565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612ab257607f821691505b602082108103612ad257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105e657600081815260208120601f850160051c81016020861015612aff5750805b601f850160051c820191505b81811015612b1e57828155600101612b0b565b505050505050565b813581556001808201602080850135601e19863603018112612b4757600080fd5b8501803567ffffffffffffffff811115612b6057600080fd5b8036038383011315612b7157600080fd5b612b8581612b7f8654612a9e565b86612ad8565b6000601f821160018114612bbb5760008315612ba357508382018501355b600019600385901b1c1916600184901b178655612c14565b600086815260209020601f19841690835b82811015612beb57868501880135825593870193908901908701612bcc565b5084821015612c0a5760001960f88660031b161c198785880101351681555b50508683881b0186555b505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561073057610730612c1f565b815167ffffffffffffffff811115612c6257612c626122ee565b612c7681612c708454612a9e565b84612ad8565b602080601f831160018114612cab5760008415612c935750858301515b600019600386901b1c1916600185901b178555612b1e565b600085815260208120601f198616915b82811015612cda57888601518255948401946001909101908401612cbb565b5085821015612cf85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b828152604081016124d260208301846125ef565b600060608284031215612d2e57600080fd5b612d36612304565b825181526020830151612d4881612881565b60208201526040830151612d5b81612881565b60408201529392505050565b828152604060208201526000611b0d604083018461258e565b80516119e6816123c8565b600082601f830112612d9c57600080fd5b8151612daa6123fe82612451565b818152846020838601011115612dbf57600080fd5b611b0d82602083016020870161256a565b600060408284031215612de257600080fd5b612dea61232d565b905081518152602082015167ffffffffffffffff811115612e0a57600080fd5b612e1684828501612d8b565b60208301525092915050565b600060208284031215612e3457600080fd5b815167ffffffffffffffff80821115612e4c57600080fd5b9083019060c08286031215612e6057600080fd5b612e68612350565b825181526020830151612e7a816123c8565b60208201526040830151612e8d816123c8565b6040820152606083015182811115612ea457600080fd5b612eb087828601612dd0565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b808202811582820484141761073057610730612c1f565b600082612f0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561073057610730612c1f565b600060018201612f3457612f34612c1f565b5060010190565b60008060008060808587031215612f5157600080fd5b8451612f5c816123c8565b6020860151909450612f6d816123c8565b60408601516060870151919450925067ffffffffffffffff811115612f9157600080fd5b612f9d87828801612dd0565b91505092959194509250565b604081526000612fbc604083018561258e565b90506001600160a01b03831660208301529392505050565b600060208284031215612fe657600080fd5b81516124d281612881565b60006020828403121561300357600080fd5b815167ffffffffffffffff8082111561301b57600080fd5b9083019060c0828603121561302f57600080fd5b613037612350565b825181526020830151602082015260408301518281111561305757600080fd5b61306387828601612d8b565b60408301525060608301518281111561307b57600080fd5b61308787828601612dd0565b60608301525061309960808401612d80565b60808201526130aa60a08401612d80565b60a082015295945050505050565b6000602082840312156130ca57600080fd5b81516124d2816123c8565b600080604083850312156130e857600080fd5b82516130f3816123c8565b602093909301519294929350505056fea2646970667358221220cdc1dbd193b77181dcc1bad2e31acef1cadf1745f832a969464a85225890df9b64736f6c63430008130033"; diff --git a/src/strategies/QVSimpleStrategy/types.ts b/src/strategies/QVSimpleStrategy/types.ts new file mode 100644 index 0000000..904e2f3 --- /dev/null +++ b/src/strategies/QVSimpleStrategy/types.ts @@ -0,0 +1,74 @@ +import { Metadata } from "../../types"; +import { Status } from "../types"; + +export type InitializeParams = { + registryGating: boolean; + metadataRequired: boolean; + reviewThreshold: bigint; + registrationStartTime: bigint; + registrationEndTime: bigint; + allocationStartTime: bigint; + allocationEndTime: bigint; +}; + +// struct InitializeParams { +// // slot 0 +// bool registryGating; +// bool metadataRequired; +// // slot 1 +// uint256 reviewThreshold; +// // slot 2 +// uint64 registrationStartTime; +// uint64 registrationEndTime; +// uint64 allocationStartTime; +// uint64 allocationEndTime; +// } + +export type InitializeParamsSimple = { + maxVoiceCreditsPerAllocator: bigint; + params: InitializeParams; +}; + +// struct InitializeParamsSimple { +// // slot 0 +// uint256 maxVoiceCreditsPerAllocator; +// // slot 1..n +// InitializeParams params; +// } + +export type Recipient = { + totalVotesReceived: bigint; + useRegistryAnchor: boolean; + recipientAddress: string; + metadata: Metadata; + recipientStatus: Status; + applicationId: bigint; +}; + +/// @notice The details of the recipient +// struct Recipient { +// // slot 0 +// uint256 totalVotesReceived; +// // slot 1 +// bool useRegistryAnchor; +// address recipientAddress; +// Metadata metadata; +// Status recipientStatus; +// // slot 2 +// uint256 applicationId; +// } + +export type Milestone = { + amountPercentage: bigint; + metadata: Metadata; + milestoneStatus: Status; +}; + +// /// @notice The details of the allocator +// struct Allocator { +// // slot 0 +// uint256 voiceCredits; +// // slots [1...n] +// mapping(address => uint256) voiceCreditsCastToRecipient; +// mapping(address => uint256) votesCastToRecipient; +// } diff --git a/src/strategies/RFPSimpleStrategy/README.md b/src/strategies/RFPSimpleStrategy/README.md new file mode 100644 index 0000000..e69de29 diff --git a/src/strategies/RFPSimpleStrategy/RFPSimpleStrategy.ts b/src/strategies/RFPSimpleStrategy/RFPSimpleStrategy.ts new file mode 100644 index 0000000..9523d94 --- /dev/null +++ b/src/strategies/RFPSimpleStrategy/RFPSimpleStrategy.ts @@ -0,0 +1,45 @@ +import { + PublicClient, + Transport, + Chain, + extractChain, + getContract, + } from "viem"; + import { Allo } from "../../Allo/Allo"; + import { ConstructorArgs } from "../../types"; + import { supportedChains } from "../../chains.config"; + import { create } from "../../Client/Client"; + + export class RFPSimpleStrategy { + private client: PublicClient; + + private contract: any; + + private strategy: `0x${string}` | undefined; + + private poolId: bigint; + + private allo: Allo; + + constructor({ chain, rpc, address, poolId }: ConstructorArgs) { + const usedChain = extractChain({ + chains: supportedChains, + id: chain as any, + }); + + this.client = create(usedChain, rpc); + + this.allo = new Allo({ chain, rpc }); + + if (address) { + this.contract = getContract({ + address: address, + abi: [], + publicClient: this.client, + }); + this.strategy = address; + } + + this.poolId = poolId || BigInt(-1); + } + } \ No newline at end of file diff --git a/src/strategies/RFPSimpleStrategy/rfpSimple.config.ts b/src/strategies/RFPSimpleStrategy/rfpSimple.config.ts new file mode 100644 index 0000000..027b5dc --- /dev/null +++ b/src/strategies/RFPSimpleStrategy/rfpSimple.config.ts @@ -0,0 +1,594 @@ +export const abi = [ + { + type: "constructor", + inputs: [ + { name: "_allo", type: "address", internalType: "address" }, + { name: "_name", type: "string", internalType: "string" }, + ], + stateMutability: "nonpayable", + }, + { type: "receive", stateMutability: "payable" }, + { + type: "function", + name: "NATIVE", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "acceptedRecipientId", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "allocate", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "distribute", + inputs: [ + { name: "_recipientIds", type: "address[]", internalType: "address[]" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getAllo", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IAllo" }], + stateMutability: "view", + }, + { + type: "function", + name: "getMilestone", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct RFPSimpleStrategy.Milestone", + components: [ + { + name: "amountPercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getMilestoneStatus", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPayouts", + inputs: [ + { name: "", type: "address[]", internalType: "address[]" }, + { name: "", type: "bytes[]", internalType: "bytes[]" }, + ], + outputs: [ + { + name: "", + type: "tuple[]", + internalType: "struct IStrategy.PayoutSummary[]", + components: [ + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "amount", type: "uint256", internalType: "uint256" }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolAmount", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getPoolId", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipient", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct RFPSimpleStrategy.Recipient", + components: [ + { name: "useRegistryAnchor", type: "bool", internalType: "bool" }, + { + name: "recipientAddress", + type: "address", + internalType: "address", + }, + { name: "proposalBid", type: "uint256", internalType: "uint256" }, + { + name: "recipientStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getRecipientStatus", + inputs: [ + { name: "_recipientId", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "", type: "uint8", internalType: "enum IStrategy.Status" }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getStrategyId", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + name: "increaseMaxBid", + inputs: [{ name: "_maxBid", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "increasePoolAmount", + inputs: [{ name: "_amount", type: "uint256", internalType: "uint256" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "initialize", + inputs: [ + { name: "_poolId", type: "uint256", internalType: "uint256" }, + { name: "_data", type: "bytes", internalType: "bytes" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isPoolActive", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isValidAllocator", + inputs: [{ name: "_allocator", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "maxBid", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "metadataRequired", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "milestones", + inputs: [{ name: "", type: "uint256", internalType: "uint256" }], + outputs: [ + { name: "amountPercentage", type: "uint256", internalType: "uint256" }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "registerRecipient", + inputs: [ + { name: "_data", type: "bytes", internalType: "bytes" }, + { name: "_sender", type: "address", internalType: "address" }, + ], + outputs: [ + { name: "recipientId", type: "address", internalType: "address" }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "rejectMilestone", + inputs: [ + { name: "_milestoneId", type: "uint256", internalType: "uint256" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMilestones", + inputs: [ + { + name: "_milestones", + type: "tuple[]", + internalType: "struct RFPSimpleStrategy.Milestone[]", + components: [ + { + name: "amountPercentage", + type: "uint256", + internalType: "uint256", + }, + { + name: "metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + { + name: "milestoneStatus", + type: "uint8", + internalType: "enum IStrategy.Status", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setPoolActive", + inputs: [{ name: "_flag", type: "bool", internalType: "bool" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "submitUpcomingMilestone", + inputs: [ + { + name: "_metadata", + type: "tuple", + internalType: "struct Metadata", + components: [ + { name: "protocol", type: "uint256", internalType: "uint256" }, + { name: "pointer", type: "string", internalType: "string" }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upcomingMilestone", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + name: "useRegistryAnchor", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "withdraw", + inputs: [{ name: "_token", type: "address", internalType: "address" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Allocated", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "token", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Distributed", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "recipientAddress", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "poolId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + ], + anonymous: false, + }, + { + type: "event", + name: "MaxBidIncreased", + inputs: [ + { + name: "maxBid", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilestoneStatusChanged", + inputs: [ + { + name: "milestoneId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "status", + type: "uint8", + indexed: false, + internalType: "enum IStrategy.Status", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilestonesSet", + inputs: [ + { + name: "milestonesLength", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MilstoneSubmitted", + inputs: [ + { + name: "milestoneId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "PoolActive", + inputs: [ + { name: "active", type: "bool", indexed: false, internalType: "bool" }, + ], + anonymous: false, + }, + { + type: "event", + name: "Registered", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdatedRegistration", + inputs: [ + { + name: "recipientId", + type: "address", + indexed: true, + internalType: "address", + }, + { name: "data", type: "bytes", indexed: false, internalType: "bytes" }, + { + name: "sender", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { type: "error", name: "ALLOCATION_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "ALLOCATION_NOT_ENDED", inputs: [] }, + { type: "error", name: "ALREADY_INITIALIZED", inputs: [] }, + { type: "error", name: "AMOUNT_MISMATCH", inputs: [] }, + { type: "error", name: "AMOUNT_TOO_LOW", inputs: [] }, + { type: "error", name: "ANCHOR_ERROR", inputs: [] }, + { type: "error", name: "ARRAY_MISMATCH", inputs: [] }, + { type: "error", name: "EXCEEDING_MAX_BID", inputs: [] }, + { type: "error", name: "EXCESS_AMOUNT_SENT", inputs: [] }, + { type: "error", name: "INVALID", inputs: [] }, + { type: "error", name: "INVALID_ADDRESS", inputs: [] }, + { type: "error", name: "INVALID_FEE", inputs: [] }, + { type: "error", name: "INVALID_METADATA", inputs: [] }, + { type: "error", name: "INVALID_MILESTONE", inputs: [] }, + { type: "error", name: "INVALID_REGISTRATION", inputs: [] }, + { type: "error", name: "IS_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "MILESTONES_ALREADY_SET", inputs: [] }, + { type: "error", name: "MILESTONE_NOT_PENDING", inputs: [] }, + { type: "error", name: "MISMATCH", inputs: [] }, + { type: "error", name: "NONCE_NOT_AVAILABLE", inputs: [] }, + { type: "error", name: "NON_ZERO_VALUE", inputs: [] }, + { type: "error", name: "NOT_APPROVED_STRATEGY", inputs: [] }, + { type: "error", name: "NOT_ENOUGH_FUNDS", inputs: [] }, + { type: "error", name: "NOT_IMPLEMENTED", inputs: [] }, + { type: "error", name: "NOT_INITIALIZED", inputs: [] }, + { type: "error", name: "NOT_PENDING_OWNER", inputs: [] }, + { type: "error", name: "POOL_ACTIVE", inputs: [] }, + { type: "error", name: "POOL_INACTIVE", inputs: [] }, + { type: "error", name: "RECIPIENT_ALREADY_ACCEPTED", inputs: [] }, + { + type: "error", + name: "RECIPIENT_ERROR", + inputs: [{ name: "recipientId", type: "address", internalType: "address" }], + }, + { type: "error", name: "RECIPIENT_NOT_ACCEPTED", inputs: [] }, + { type: "error", name: "REGISTRATION_ACTIVE", inputs: [] }, + { type: "error", name: "REGISTRATION_NOT_ACTIVE", inputs: [] }, + { type: "error", name: "UNAUTHORIZED", inputs: [] }, + { type: "error", name: "ZERO_ADDRESS", inputs: [] }, +] as const; + +export const bytecode = + "0x60c06040523480156200001157600080fd5b50604051620038bc380380620038bc8339810160408190526200003491620000c0565b6001600160a01b03821660805260405182908290829082906200005c9082906020016200019b565b60408051601f19818403018152919052805160209091012060a05250620001d0945050505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620000b75781810151838201526020016200009d565b50506000910152565b60008060408385031215620000d457600080fd5b82516001600160a01b0381168114620000ec57600080fd5b60208401519092506001600160401b03808211156200010a57600080fd5b818501915085601f8301126200011f57600080fd5b81518181111562000134576200013462000084565b604051601f8201601f19908116603f011681019083821181831017156200015f576200015f62000084565b816040528281528860208487010111156200017957600080fd5b6200018c8360208301602088016200009a565b80955050505050509250929050565b6020815260008251806020840152620001bc8160408501602087016200009a565b601f01601f19169190910160400192915050565b60805160a0516136aa62000212600039600061041a01526000818161030b01528181611141015281816111d4015281816113710152611e4c01526136aa6000f3fe60806040526004361061026e5760003560e01c806362812a3911610153578063cb0e85a6116100cb578063eb11af931161007f578063edd146cc11610064578063edd146cc146107b7578063ef2920fc146107d7578063f5b0dfb7146107ea57600080fd5b8063eb11af9314610765578063eb8203121461078557600080fd5b8063d2e17f59116100b0578063d2e17f59146106fb578063df868ed314610723578063dff7d2c71461073857600080fd5b8063cb0e85a61461068e578063cf96453b146106ad57600080fd5b80639af5c09d11610122578063a647d23e11610107578063a647d23e1461061a578063ac9650d814610634578063b2b878d01461066157600080fd5b80639af5c09d146105d1578063a0cf0aea146105f257600080fd5b806362812a39146105165780637c1887dd146105435780637f8359831461058157806381f03fcb146105a157600080fd5b806341f44125116101e65780634ab4ba42116101b557806351cff8d91161019a57806351cff8d9146104ca57806357825849146104ea578063590107011461050057600080fd5b80634ab4ba42146104955780634d31d087146104aa57600080fd5b806341f44125146103eb57806342fda9c71461040b5780634533d6781461043e5780634a4f8e041461047f57600080fd5b80632143e92f1161023d578063259d6dde11610222578063259d6dde146103935780632bbe0cae146103c357806338fff2d0146103d657600080fd5b80632143e92f14610343578063217550881461036357600080fd5b806307fca3811461027a578063084ea36e1461029c5780630a6f0ee9146102dc57806315cc481e146102fc57600080fd5b3661027557005b600080fd5b34801561028657600080fd5b5061029a61029536600461274b565b61080a565b005b3480156102a857600080fd5b506102c96102b736600461274b565b60086020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b5061029a6102f7366004612936565b61086d565b34801561030857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016102d3565b34801561034f57600080fd5b5061029a61035e3660046129c4565b61088d565b34801561036f57600080fd5b506006546103839062010000900460ff1681565b60405190151581526020016102d3565b34801561039f57600080fd5b506103836103ae36600461274b565b600d6020526000908152604090205460ff1681565b61032b6103d1366004612a20565b6108aa565b3480156103e257600080fd5b506001546102c9565b3480156103f757600080fd5b5061029a61040636600461274b565b6108cf565b34801561041757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102c9565b34801561044a57600080fd5b5060055461046690600160c01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102d3565b34801561048b57600080fd5b506102c9600c5481565b3480156104a157600080fd5b506002546102c9565b3480156104b657600080fd5b506103836104c536600461274b565b61092d565b3480156104d657600080fd5b5061029a6104e536600461274b565b61094e565b3480156104f657600080fd5b506102c960045481565b34801561050c57600080fd5b506102c960035481565b34801561052257600080fd5b5061053661053136600461274b565b6109bb565b6040516102d39190612b19565b34801561054f57600080fd5b506102c961055e366004612b9b565b600a60209081526000938452604080852082529284528284209052825290205481565b34801561058d57600080fd5b5061029a61059c366004612c25565b6109cc565b3480156105ad57600080fd5b506103836105bc36600461274b565b60096020526000908152604090205460ff1681565b3480156105dd57600080fd5b506005546104669067ffffffffffffffff1681565b3480156105fe57600080fd5b5061032b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561062657600080fd5b506006546103839060ff1681565b34801561064057600080fd5b5061065461064f366004612c91565b610d27565b6040516102d39190612cd3565b34801561066d57600080fd5b5061068161067c366004612d35565b610e1c565b6040516102d39190612e0a565b34801561069a57600080fd5b5060065461038390610100900460ff1681565b3480156106b957600080fd5b506106ee6106c8366004612e62565b600b60209081526000938452604080852082529284528284209052825290205460ff1681565b6040516102d39190612e99565b34801561070757600080fd5b5060055461046690600160801b900467ffffffffffffffff1681565b34801561072f57600080fd5b50610383610f34565b34801561074457600080fd5b506005546104669068010000000000000000900467ffffffffffffffff1681565b34801561077157600080fd5b506106ee61078036600461274b565b610f43565b34801561079157600080fd5b506107a56107a036600461274b565b610f4e565b6040516102d396959493929190612ea7565b3480156107c357600080fd5b5061029a6107d2366004612ef7565b61103b565b61029a6107e5366004612a20565b6110ad565b3480156107f657600080fd5b5061029a610805366004612f3e565b6110cb565b33610814816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916905590513381527f4ddda4f889f9f60f81c0cccbc54ac7d1eb39b079ab7f29c2a1ceda4e0187085f91015b60405180910390a25050565b6108756111c9565b61087d611214565b610888838383611250565b505050565b33610897816110fe565b6108a3858585856114c0565b5050505050565b60006108b46111c9565b6108bc611214565b6108c6838361165a565b90505b92915050565b336108d9816110fe565b6001600160a01b0382166000818152600d6020908152604091829020805460ff1916600117905590513381527fc5137efba0dae412f1520f1f5633a45f7831a93f83d0db6c31d7fc2a877b88879101610861565b6001600160a01b0381166000908152600d602052604081205460ff166108c9565b33610958816110fe565b60055461097990600160c01b900467ffffffffffffffff1662278d00612f6d565b67ffffffffffffffff1642116109a257604051637fcce2a960e01b815260040160405180910390fd5b60006109ae83306119b4565b90506108888333836119fd565b6109c36126da565b6108c982611a37565b336109d6816110fe565b6109de611b7a565b838281146109ff57604051637fcce2a960e01b815260040160405180910390fd5b60005b81811015610d1e576000858583818110610a1e57610a1e612f8e565b9050602002016020810190610a339190612fa4565b90506000888884818110610a4957610a49612f8e565b9050602002016020810190610a5e919061274b565b6001600160a01b038116600090815260076020526040812060058101549293509190846006811115610a9257610a92612ae1565b1480610aaf57506004846006811115610aad57610aad612ae1565b145b15610add5760405163f4a513b960e01b81526001600160a01b03841660048201526024015b60405180910390fd5b6001600160a01b0383166000908152600b60209081526040808320848452825280832033845290915281205460ff166006811115610b1d57610b1d612ae1565b1115610b475760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b6001600160a01b0383166000908152600b6020908152604080832084845282528083203384529091529020805485919060ff19166001836006811115610b8f57610b8f612ae1565b02179055506001600160a01b0383166000908152600a60209081526040808320848452909152812090856006811115610bca57610bca612ae1565b6006811115610bdb57610bdb612ae1565b81526020019081526020016000206000815480929190610bfa90612fbf565b90915550506004546001600160a01b0384166000908152600a60209081526040808320858452909152812090866006811115610c3857610c38612ae1565b6006811115610c4957610c49612ae1565b81526020019081526020016000205410610cca5760048201805485919060ff19166001836006811115610c7e57610c7e612ae1565b0217905550826001600160a01b03167f8d3031e5c1c3d32d10a32b857e83ec347f244057dc2dfaf266600cdc7f97c27382866000604051610cc193929190612fd8565b60405180910390a25b826001600160a01b03167f296facfa5767c7b9c26d407470403f9cd96181a04e27329e4d006a59b458c6b3828633604051610d0793929190612fd8565b60405180910390a284600101945050505050610a02565b50505050505050565b60608167ffffffffffffffff811115610d4257610d4261276f565b604051908082528060200260200182016040528015610d7557816020015b6060815260200190600190039081610d605790505b50905060005b82811015610e1557610de530858584818110610d9957610d99612f8e565b9050602002810190610dab9190613003565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bad92505050565b828281518110610df757610df7612f8e565b60200260200101819052508080610e0d90612fbf565b915050610d7b565b5092915050565b81518151606091908114610e5c576040517f7b49805600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff811115610e7757610e7761276f565b604051908082528060200260200182016040528015610ebc57816020015b6040805180820190915260008082526020820152815260200190600190039081610e955790505b50905060005b82811015610f2b57610f06868281518110610edf57610edf612f8e565b6020026020010151868381518110610ef957610ef9612f8e565b6020026020010151611bd2565b828281518110610f1857610f18612f8e565b6020908102919091010152600101610ec2565b50949350505050565b6000610f3e611d8d565b905090565b60006108c982611dd7565b6007602090815260009182526040918290208054600182015484518086019095526002830180548652600384018054939660ff8416966101009094046001600160a01b03169594909384019190610fa49061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd09061304a565b801561101d5780601f10610ff25761010080835404028352916020019161101d565b820191906000526020600020905b81548152906001019060200180831161100057829003601f168201915b505050919092525050506004820154600590920154909160ff169086565b6110436111c9565b600081806020019051810190611059919061308e565b9050611069838260200151611dec565b8051600c556040517f91efa3d50feccde0d0d202f8ae5c41ca0b2be614cebcb2bd2f4b019396e6568a906110a0908590859061314e565b60405180910390a1505050565b6110b56111c9565b6110bd611214565b6110c78282611f0c565b5050565b6110d36111c9565b6110dc81611fec565b80600260008282546110ee9190613167565b909155506110fb90508181565b50565b6001546040517f29e40d4b00000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906329e40d4b90604401602060405180830381865afa158015611188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ac919061317a565b6110fb5760405163075fd2b160e01b815260040160405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112125760405163075fd2b160e01b815260040160405180910390fd5b565b600154600003611212576040517f3da3f98c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061125a816110fe565b611262612016565b835160005b8181101561149757600086828151811061128357611283612f8e565b60200260200101519050600060076000836001600160a01b03166001600160a01b03168152602001908152602001600020905060006112d18360405180602001604052806000815250611bd2565b6020808201516001600160a01b038616600090815260099092526040909120549192509060ff1680611309575061130784612062565b155b80611312575080155b1561133b5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b6001546040517f068bcd8d0000000000000000000000000000000000000000000000000000000081526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163068bcd8d916113a89160040190815260200190565b600060405180830381865afa1580156113c5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113ed9190810190613237565b604081015160018601549192506114129161010090046001600160a01b0316846119fd565b6001600160a01b03858116600081815260096020908152604091829020805460ff19166001908117909155880154825161010090910485168152908101869052928c1690830152907fb5b51454adfa840bd593658325a60a50b0216f12eb5d2937efe6cea935675b7d9060600160405180910390a28560010195505050505050611267565b5060065462010000900460ff166108a3576006805462ff00001916620100001790555050505050565b8367ffffffffffffffff164211806114eb57508267ffffffffffffffff168467ffffffffffffffff16115b8061150957508167ffffffffffffffff168467ffffffffffffffff16115b8061152757508067ffffffffffffffff168267ffffffffffffffff16115b8061154557508067ffffffffffffffff168367ffffffffffffffff16115b1561156357604051637fcce2a960e01b815260040160405180910390fd5b6005805467ffffffffffffffff838116600160c01b90810277ffffffffffffffffffffffffffffffffffffffffffffffff878416600160801b908102919091166fffffffffffffffffffffffffffffffff8a8616680100000000000000009081027fffffffffffffffffffffffffffffffff000000000000000000000000000000009098168d88161797909717161791909117948590556040805186851681529486048416602086015290850483169084015290920490911660608201523360808201527fcb0fb7a7b87db2f472ee8977444cfdbc51993ce660aca27a5969a724fae6dcf39060a00160405180910390a150505050565b600061166461209d565b6000806000611686604051806040016040528060008152602001606081525090565b60065460ff16156116d857868060200190518101906116a591906132eb565b919650945090506116b68587612107565b6116d35760405163075fd2b160e01b815260040160405180910390fd5b611742565b868060200190518101906116ec91906132eb565b91955093506001600160a01b0384161515925090508161170c578561170e565b825b945081801561172457506117228587612107565b155b156117425760405163075fd2b160e01b815260040160405180910390fd5b600654610100900460ff1680156117655750602081015151158061176557508051155b1561179c576040517fc19e07c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166117ce5760405163f4a513b960e01b81526001600160a01b0386166004820152602401610ad4565b6001600160a01b038086166000908152600760209081526040909120600181018054938816610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909416939093179092558251600283019081559083015183919060038401906118419082613395565b505060065460ff1690506118555782611858565b60015b60018201805460ff191691151591909117905560058101805460009061187d90612fbf565b90915550600481015460ff16600081600681111561189d5761189d612ae1565b036118fb5760048201805460ff191660011790556040516001600160a01b038816907fa197306e3dd5494a61a695381aa809a53b8e377a685e84e404a85d5a8da6cc62906118ee908c908c90613455565b60405180910390a26119a8565b600381600681111561190f5761190f612ae1565b03611929576004828101805460ff19169091179055611952565b600281600681111561193d5761193d612ae1565b036119525760048201805460ff191660011790555b600582015460048301546040516001600160a01b038a16927f63220f42dd2285448c45b5c8b4140e605629fd1394a1b2431a0ab0efd904e14a9261199f928e918e9160ff90911690613480565b60405180910390a25b50505050505092915050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016119ec57506001600160a01b038116316108c9565b6119f68383612243565b90506108c9565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601611a2c576108888282612278565b610888838383612294565b611a3f6126da565b6001600160a01b03808316600090815260076020908152604091829020825160c08101845281548152600182015460ff8116151582850152610100900490941684840152825180840190935260028101805484526003820180549294606087019490939084019190611ab09061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611adc9061304a565b8015611b295780601f10611afe57610100808354040283529160200191611b29565b820191906000526020600020905b815481529060010190602001808311611b0c57829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611b5457611b54612ae1565b6006811115611b6557611b65612ae1565b81526020016005820154815250509050919050565b600554600160c01b900467ffffffffffffffff164211156112125760405162b828c960e81b815260040160405180910390fd5b60606108c6838360405180606001604052806027815260200161364e602791396122e3565b604080518082018252600080825260208083018290526001600160a01b03868116835260078252848320855160c08101875281548152600182015460ff811615158286015261010090049092168287015285518087019096526002810180548752600382018054969795969395929460608701949084019190611c549061304a565b80601f0160208091040260200160405190810160405280929190818152602001828054611c809061304a565b8015611ccd5780601f10611ca257610100808354040283529160200191611ccd565b820191906000526020600020905b815481529060010190602001808311611cb057829003601f168201915b505050919092525050508152600482015460209091019060ff166006811115611cf857611cf8612ae1565b6006811115611d0957611d09612ae1565b8152600591909101546020918201526001600160a01b0386166000908152600990915260408120549192509060ff16158015611d46575060035415155b15611d6a576003548251600254611d5d91906134c0565b611d6791906134d7565b90505b6040805180820182529201516001600160a01b0316825260208201529392505050565b6005546000904267ffffffffffffffff90911611801590611dc6575060055468010000000000000000900467ffffffffffffffff164211155b15611dd15750600190565b50600090565b6000611de282611a37565b6080015192915050565b611df58261235b565b80516006805460208085015161ffff1990921693151561ff0019169390931761010091151591909102179055604080517f5ab1bd5300000000000000000000000000000000000000000000000000000000815290517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692635ab1bd5392600480820193918290030181865afa158015611e9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebf91906134f9565b600660036101000a8154816001600160a01b0302191690836001600160a01b0316021790555080604001516004819055506110c7816060015182608001518360a001518460c001516114c0565b60008083806020019051810190611f239190613516565b6001600160a01b038281166000908152600760209081526040808320938916835260088252808320600d909252909120549395509193509160ff16611f7b5760405163075fd2b160e01b815260040160405180910390fd5b611f8484612062565b611fac5760405163f4a513b960e01b81526001600160a01b0385166004820152602401610ad4565b611fba8382600001546123c3565b611fd757604051637fcce2a960e01b815260040160405180910390fd5b611fe481838686896123dc565b505050505050565b60065462010000900460ff16156110fb57604051637fcce2a960e01b815260040160405180910390fd5b600554600160c01b900467ffffffffffffffff164211611212576040517f8a879da200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060026001600160a01b03831660009081526007602052604090206004015460ff16600681111561209657612096612ae1565b1492915050565b6005544267ffffffffffffffff90911611806120d0575060055468010000000000000000900467ffffffffffffffff1642115b15611212576040517fb609ed5a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040517fdd93da430000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600092839263010000009091049091169063dd93da4390602401600060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261219f9190810190613544565b60065481516040517f5e8a791500000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038681166024830152929350630100000090910490911690635e8a791590604401602060405180830381865afa158015612217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223b919061317a565b949350505050565b6000816014526f70a0823100000000000000000000000060005260208060246010865afa601f3d111660205102905092915050565b60008060008084865af16110c75763b12d13eb6000526004601cfd5b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166122d9576390b8ec186000526004601cfd5b6000603452505050565b6060600080856001600160a01b031685604051612300919061360b565b600060405180830381855af49150503d806000811461233b576040519150601f19603f3d011682016040523d82523d6000602084013e612340565b606091505b50915091506123518683838761258d565b9695505050505050565b6123636111c9565b6001541561239d576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036123be57604051637fcce2a960e01b815260040160405180910390fd5b600155565b600c546000906123d38385613167565b11159392505050565b6123e4612606565b8160000361240557604051637fcce2a960e01b815260040160405180910390fd5b61240e83612062565b6124365760405163f4a513b960e01b81526001600160a01b0384166004820152602401610ad4565b8185600001600082825461244a9190613167565b90915550506001600160a01b03831660009081526001860160209081526040808320546002890190925282205490916124838386613167565b905060006124a161249c83670de0b6b3a76400006134c0565b612657565b90506124ad8382613627565b905080600360008282546124c19190613167565b90915550508754819089906000906124da908490613167565b90915550506001600160a01b038716600090815260018a01602052604081208054889290612509908490613167565b90915550506001600160a01b038716600090815260028a01602052604081208054839290612538908490613167565b9091555050604080518281526001600160a01b0387811660208301528916917fe19137169fc4bceb2391a0921a61084851c12884df4897f569ec45a4ee46b7e3910160405180910390a2505050505050505050565b606083156125fc5782516000036125f5576001600160a01b0385163b6125f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad4565b508161223b565b61223b83836126b0565b60055442600160801b90910467ffffffffffffffff16118061263a5750600554600160c01b900467ffffffffffffffff1642115b156112125760405162b828c960e81b815260040160405180910390fd5b6000806002612667846001613167565b61267191906134d7565b90508291505b818110156126aa5790508060028161268f81866134d7565b6126999190613167565b6126a391906134d7565b9050612677565b50919050565b8151156126c05781518083602001fd5b8060405162461bcd60e51b8152600401610ad4919061363a565b6040518060c001604052806000815260200160001515815260200160006001600160a01b03168152602001612722604051806040016040528060008152602001606081525090565b815260200160008152602001600081525090565b6001600160a01b03811681146110fb57600080fd5b60006020828403121561275d57600080fd5b813561276881612736565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156127a8576127a861276f565b60405290565b60405160e0810167ffffffffffffffff811182821017156127a8576127a861276f565b60405160c0810167ffffffffffffffff811182821017156127a8576127a861276f565b604051601f8201601f1916810167ffffffffffffffff8111828210171561281d5761281d61276f565b604052919050565b600067ffffffffffffffff82111561283f5761283f61276f565b5060051b60200190565b600082601f83011261285a57600080fd5b8135602061286f61286a83612825565b6127f4565b82815260059290921b8401810191818101908684111561288e57600080fd5b8286015b848110156128b25780356128a581612736565b8352918301918301612892565b509695505050505050565b600067ffffffffffffffff8211156128d7576128d761276f565b50601f01601f191660200190565b600082601f8301126128f657600080fd5b813561290461286a826128bd565b81815284602083860101111561291957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561294b57600080fd5b833567ffffffffffffffff8082111561296357600080fd5b61296f87838801612849565b9450602086013591508082111561298557600080fd5b50612992868287016128e5565b92505060408401356129a381612736565b809150509250925092565b67ffffffffffffffff811681146110fb57600080fd5b600080600080608085870312156129da57600080fd5b84356129e5816129ae565b935060208501356129f5816129ae565b92506040850135612a05816129ae565b91506060850135612a15816129ae565b939692955090935050565b60008060408385031215612a3357600080fd5b823567ffffffffffffffff811115612a4a57600080fd5b612a56858286016128e5565b9250506020830135612a6781612736565b809150509250929050565b60005b83811015612a8d578181015183820152602001612a75565b50506000910152565b60008151808452612aae816020860160208601612a72565b601f01601f19169290920160200192915050565b80518252600060208201516040602085015261223b6040850182612a96565b634e487b7160e01b600052602160045260246000fd5b60078110612b1557634e487b7160e01b600052602160045260246000fd5b9052565b60208152815160208201526020820151151560408201526001600160a01b0360408301511660608201526000606083015160c06080840152612b5e60e0840182612ac2565b90506080840151612b7260a0850182612af7565b5060a084015160c08401528091505092915050565b803560078110612b9657600080fd5b919050565b600080600060608486031215612bb057600080fd5b8335612bbb81612736565b925060208401359150612bd060408501612b87565b90509250925092565b60008083601f840112612beb57600080fd5b50813567ffffffffffffffff811115612c0357600080fd5b6020830191508360208260051b8501011115612c1e57600080fd5b9250929050565b60008060008060408587031215612c3b57600080fd5b843567ffffffffffffffff80821115612c5357600080fd5b612c5f88838901612bd9565b90965094506020870135915080821115612c7857600080fd5b50612c8587828801612bd9565b95989497509550505050565b60008060208385031215612ca457600080fd5b823567ffffffffffffffff811115612cbb57600080fd5b612cc785828601612bd9565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612d2857603f19888603018452612d16858351612a96565b94509285019290850190600101612cfa565b5092979650505050505050565b60008060408385031215612d4857600080fd5b823567ffffffffffffffff80821115612d6057600080fd5b612d6c86838701612849565b9350602091508185013581811115612d8357600080fd5b8501601f81018713612d9457600080fd5b8035612da261286a82612825565b81815260059190911b82018401908481019089831115612dc157600080fd5b8584015b83811015612df957803586811115612ddd5760008081fd5b612deb8c89838901016128e5565b845250918601918601612dc5565b508096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b82811015612e5557815180516001600160a01b03168552860151868501529284019290850190600101612e27565b5091979650505050505050565b600080600060608486031215612e7757600080fd5b8335612e8281612736565b92506020840135915060408401356129a381612736565b602081016108c98284612af7565b86815285151560208201526001600160a01b038516604082015260c060608201526000612ed760c0830186612ac2565b9050612ee66080830185612af7565b8260a0830152979650505050505050565b60008060408385031215612f0a57600080fd5b82359150602083013567ffffffffffffffff811115612f2857600080fd5b612f34858286016128e5565b9150509250929050565b600060208284031215612f5057600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115610e1557610e15612f57565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612fb657600080fd5b6108c682612b87565b600060018201612fd157612fd1612f57565b5060010190565b83815260608101612fec6020830185612af7565b6001600160a01b0383166040830152949350505050565b6000808335601e1984360301811261301a57600080fd5b83018035915067ffffffffffffffff82111561303557600080fd5b602001915036819003821315612c1e57600080fd5b600181811c9082168061305e57607f821691505b6020821081036126aa57634e487b7160e01b600052602260045260246000fd5b80518015158114612b9657600080fd5b60008183036101008112156130a257600080fd5b6130aa612785565b8351815260e0601f19830112156130c057600080fd5b6130c86127ae565b91506130d66020850161307e565b82526130e46040850161307e565b6020830152606084015160408301526080840151613101816129ae565b606083015260a0840151613114816129ae565b608083015260c0840151613127816129ae565b60a083015260e084015161313a816129ae565b60c083015260208101919091529392505050565b82815260406020820152600061223b6040830184612a96565b808201808211156108c9576108c9612f57565b60006020828403121561318c57600080fd5b6108c68261307e565b8051612b9681612736565b600082601f8301126131b157600080fd5b81516131bf61286a826128bd565b8181528460208386010111156131d457600080fd5b61223b826020830160208701612a72565b6000604082840312156131f757600080fd5b6131ff612785565b905081518152602082015167ffffffffffffffff81111561321f57600080fd5b61322b848285016131a0565b60208301525092915050565b60006020828403121561324957600080fd5b815167ffffffffffffffff8082111561326157600080fd5b9083019060c0828603121561327557600080fd5b61327d6127d1565b82518152602083015161328f81612736565b602082015260408301516132a281612736565b60408201526060830151828111156132b957600080fd5b6132c5878286016131e5565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b60008060006060848603121561330057600080fd5b835161330b81612736565b602085015190935061331c81612736565b604085015190925067ffffffffffffffff81111561333957600080fd5b613345868287016131e5565b9150509250925092565b601f82111561088857600081815260208120601f850160051c810160208610156133765750805b601f850160051c820191505b81811015611fe457828155600101613382565b815167ffffffffffffffff8111156133af576133af61276f565b6133c3816133bd845461304a565b8461334f565b602080601f8311600181146133f857600084156133e05750858301515b600019600386901b1c1916600185901b178555611fe4565b600085815260208120601f198616915b8281101561342757888601518255948401946001909101908401613408565b50858210156134455787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006134686040830185612a96565b90506001600160a01b03831660208301529392505050565b8481526080602082015260006134996080830186612a96565b90506001600160a01b03841660408301526134b76060830184612af7565b95945050505050565b80820281158282048414176108c9576108c9612f57565b6000826134f457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561350b57600080fd5b815161276881612736565b6000806040838503121561352957600080fd5b825161353481612736565b6020939093015192949293505050565b60006020828403121561355657600080fd5b815167ffffffffffffffff8082111561356e57600080fd5b9083019060c0828603121561358257600080fd5b61358a6127d1565b82518152602083015160208201526040830151828111156135aa57600080fd5b6135b6878286016131a0565b6040830152506060830151828111156135ce57600080fd5b6135da878286016131e5565b6060830152506135ec60808401613195565b60808201526135fd60a08401613195565b60a082015295945050505050565b6000825161361d818460208701612a72565b9190910192915050565b818103818111156108c9576108c9612f57565b6020815260006108c66020830184612a9656fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f15b0c2d6e8bec4e4fd5e22a5042b1673d24fb24a00e3edc2f6640bec04867c464736f6c63430008130033"; diff --git a/src/strategies/RFPSimpleStrategy/types.ts b/src/strategies/RFPSimpleStrategy/types.ts new file mode 100644 index 0000000..f7ab301 --- /dev/null +++ b/src/strategies/RFPSimpleStrategy/types.ts @@ -0,0 +1,44 @@ +import { Metadata } from "../../types"; +import { Status } from "../types"; + +// /// @notice Stores the details needed for initializing strategy +// struct InitializeParams { +// uint256 maxBid; +// bool useRegistryAnchor; +// bool metadataRequired; +// } + +export type InitializeParams = { + maxBid: bigint; + useRegistryAnchor: boolean; + metadataRequired: boolean; +}; + +// struct Recipient { +// bool useRegistryAnchor; +// address recipientAddress; +// uint256 proposalBid; +// Status recipientStatus; +// Metadata metadata; +// } + +export type Recipient = { + useRegistryAnchor: boolean; + recipientAddress: string; + proposalBid: bigint; + recipientStatus: Status; + metadata: Metadata; +}; + +// /// @notice Stores the details of the milestone +// struct Milestone { +// uint256 amountPercentage; +// Metadata metadata; +// Status milestoneStatus; +// } + +export type Milestone = { + amountPercentage: bigint; + metadata: Metadata; + milestoneStatus: Status; +};